summaryrefslogtreecommitdiff
path: root/keyboards/converter/palm_usb
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/converter/palm_usb')
-rw-r--r--keyboards/converter/palm_usb/config.h55
-rw-r--r--keyboards/converter/palm_usb/matrix.c15
-rw-r--r--keyboards/converter/palm_usb/post_rules.mk7
-rw-r--r--keyboards/converter/palm_usb/rules.mk1
4 files changed, 5 insertions, 73 deletions
diff --git a/keyboards/converter/palm_usb/config.h b/keyboards/converter/palm_usb/config.h
index 4afc654e85..35032835cd 100644
--- a/keyboards/converter/palm_usb/config.h
+++ b/keyboards/converter/palm_usb/config.h
@@ -60,58 +60,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
get_mods() == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \
get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
-
-
-/* Serial(USART) configuration
- * asynchronous, negative logic, 9600baud, no flow control
- * 1-start bit, 8-data bit, non parity, 1-stop bit
- */
-#define SERIAL_SOFT_BAUD 9600
-#define SERIAL_SOFT_PARITY_NONE
-#define SERIAL_SOFT_BIT_ORDER_LSB
-#if (HANDSPRING == 0)
- #define SERIAL_SOFT_LOGIC_NEGATIVE //RS232 logic
-#endif
-/* RXD Port */
-#define SERIAL_SOFT_RXD_ENABLE
-
-// we are using Pro micro pin 3 / D0 as serial
-#define SERIAL_SOFT_RXD_DDR DDRD
-#define SERIAL_SOFT_RXD_PORT PORTD
-#define SERIAL_SOFT_RXD_PIN PIND
-#define SERIAL_SOFT_RXD_BIT 0
-#define SERIAL_SOFT_RXD_VECT INT0_vect
-
-/* RXD Interupt */
-#define SERIAL_SOFT_RXD_INIT() do { \
- /* pin configuration: input with pull-up */ \
- SERIAL_SOFT_RXD_DDR &= ~(1<<SERIAL_SOFT_RXD_BIT); \
- SERIAL_SOFT_RXD_PORT |= (1<<SERIAL_SOFT_RXD_BIT); \
- /* enable interrupt: INT0(rising edge) */ \
- EICRA |= ((1<<ISC01)|(1<<ISC00)); \
- EIMSK |= (1<<INT0); \
- sei(); \
-} while (0)
-#define SERIAL_SOFT_RXD_INT_ENTER()
-#define SERIAL_SOFT_RXD_INT_EXIT() do { \
- /* clear interrupt flag */ \
- EIFR = (1<<INTF0); \
-} while (0)
-#define SERIAL_SOFT_RXD_READ() (SERIAL_SOFT_RXD_PIN&(1<<SERIAL_SOFT_RXD_BIT))
-
-/* TXD Port */
-#define SERIAL_SOFT_TXD_ENABLE
-#define SERIAL_SOFT_TXD_DDR DDRD
-#define SERIAL_SOFT_TXD_PORT PORTD
-#define SERIAL_SOFT_TXD_PIN PIND
-#define SERIAL_SOFT_TXD_BIT 3
-#define SERIAL_SOFT_TXD_HI() do { SERIAL_SOFT_TXD_PORT |= (1<<SERIAL_SOFT_TXD_BIT); } while (0)
-#define SERIAL_SOFT_TXD_LO() do { SERIAL_SOFT_TXD_PORT &= ~(1<<SERIAL_SOFT_TXD_BIT); } while (0)
-#define SERIAL_SOFT_TXD_INIT() do { \
- /* pin configuration: output */ \
- SERIAL_SOFT_TXD_DDR |= (1<<SERIAL_SOFT_TXD_BIT); \
- /* idle */ \
- SERIAL_SOFT_TXD_ON(); \
-} while (0)
-
-
diff --git a/keyboards/converter/palm_usb/matrix.c b/keyboards/converter/palm_usb/matrix.c
index 289284b616..010fd56c79 100644
--- a/keyboards/converter/palm_usb/matrix.c
+++ b/keyboards/converter/palm_usb/matrix.c
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
-#include "protocol/serial.h"
+#include "uart.h"
#include "timer.h"
@@ -58,8 +58,6 @@ static uint16_t disconnect_counter = 0;
#define COL(code) ((code & COL_MASK) )
#define KEYUP(code) ((code & KEY_MASK) >>7 )
-static bool is_modified = false;
-
__attribute__ ((weak))
void matrix_init_kb(void) {
matrix_init_user();
@@ -166,7 +164,7 @@ uint8_t rts_reset(void) {
uint8_t get_serial_byte(void) {
static uint8_t code;
while(1) {
- code = serial_recv();
+ code = uart_read();
if (code) {
debug_hex(code); debug(" ");
return code;
@@ -242,7 +240,7 @@ void matrix_init(void)
debug_enable = true;
//debug_matrix =true;
- serial_init(); // arguments all #defined
+ uart_init(9600); // arguments all #defined
#if (HANDSPRING == 0)
pins_init(); // set all inputs and outputs.
@@ -292,7 +290,7 @@ void matrix_init(void)
uint8_t matrix_scan(void)
{
uint8_t code;
- code = serial_recv();
+ code = uart_read();
if (!code) {
/*
disconnect_counter ++;
@@ -354,11 +352,6 @@ uint8_t matrix_scan(void)
return code;
}
-bool matrix_is_modified(void)
-{
- return is_modified;
-}
-
inline
bool matrix_has_ghost(void)
{
diff --git a/keyboards/converter/palm_usb/post_rules.mk b/keyboards/converter/palm_usb/post_rules.mk
deleted file mode 100644
index 9c11076701..0000000000
--- a/keyboards/converter/palm_usb/post_rules.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-ifdef HARDWARE_SERIAL
- # Untested with palm_usb
- SRC += protocol/serial_uart.c
- OPT_DEFS += -DHARDWARE_SERIAL
-else
- SRC += protocol/serial_soft.c
-endif
diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk
index c5e680b883..a1d2e39b23 100644
--- a/keyboards/converter/palm_usb/rules.mk
+++ b/keyboards/converter/palm_usb/rules.mk
@@ -20,5 +20,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
CUSTOM_MATRIX = yes
SRC += matrix.c
+QUANTUM_LIB_SRC += uart.c
DEFAULT_FOLDER = converter/palm_usb/stowaway