-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
library usage (one function per file)
- Loading branch information
1 parent
39e9d27
commit f8c5868
Showing
9 changed files
with
55 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,39 @@ | ||
#include "keyboard.h" | ||
#include "sh68f90a.h" | ||
#include "debug.h" | ||
|
||
__xdata keyboard_state_t keyboard_state; | ||
|
||
void keyboard_init() | ||
{ | ||
keyboard_state.led_state = 0x00; | ||
keyboard_state.conn_mode = P5_5; | ||
keyboard_state.os_mode = P5_6; | ||
} | ||
|
||
void keyboard_update_switches() | ||
{ | ||
if (keyboard_state.conn_mode != P5_5) { | ||
keyboard_state.conn_mode = P5_5; | ||
switch (keyboard_state.conn_mode) { | ||
case KEYBOARD_CONN_MODE_USB: | ||
dprintf("USB_MODE\r\n"); | ||
break; | ||
case KEYBOARD_CONN_MODE_RF: | ||
dprintf("RF_MODE\r\n"); | ||
break; | ||
} | ||
} | ||
|
||
if (keyboard_state.os_mode != P5_6) { | ||
keyboard_state.os_mode = P5_6; | ||
switch (keyboard_state.os_mode) { | ||
case KEYBOARD_OS_MODE_MAC: | ||
dprintf("MAC_MODE\r\n"); | ||
break; | ||
case KEYBOARD_OS_MODE_WIN: | ||
dprintf("WIN_MODE\r\n"); | ||
break; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
#include "../indicators.h" | ||
|
||
bool indicators_update(__xdata keyboard_state_t *keyboard) { | ||
bool indicators_update_step(keyboard_state_t *keyboard, uint8_t current_step) | ||
{ | ||
keyboard; | ||
current_step; | ||
return true; | ||
} | ||
|
||
// bool indicators_update_step(__xdata keyboard_state_t *keyboard, uint8_t current_step) { | ||
// return true; | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,7 @@ | |
|
||
bool process_record_user(uint16_t keycode, bool key_pressed) | ||
{ | ||
keycode; | ||
key_pressed; | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters