I am attempting to modify /tmk_keyboard-master/converter/m0110_usb to get the teensy to talk to the bluefruit EZ-Key.
this pass is based on studying tmk_keyboard-master/converter/terminal_bluefruit which seems identical in scope to the project.
I added this block to /tmk_keyboard-master/converter/m0110_usb_bluefruit/config.h
@line 40
/* USART configuration
* asynchronous, 9600baud, 8-data bit, non parity, 1-stop bit, no flow control
*/
#ifdef __AVR_ATmega32U4__
#define SERIAL_UART_BAUD 9600
#define SERIAL_UART_DATA UDR1
#define SERIAL_UART_UBRR ((F_CPU/(16UL*SERIAL_UART_BAUD))-1)
#define SERIAL_UART_RXD_VECT USART1_RX_vect
#define SERIAL_UART_TXD_READY (UCSR1A&(1<<UDRE1))
#define SERIAL_UART_INIT() do { \
UBRR1L = (uint8_t) SERIAL_UART_UBRR; /* baud rate */ \
UBRR1H = (uint8_t) (SERIAL_UART_UBRR>>8); /* baud rate */ \
UCSR1B = (1<<TXEN1); /* TX: enable */ \
UCSR1C = (0<<UPM11) | (0<<UPM10) | /* parity: none(00), even(01), odd(11) */ \
(0<<UCSZ12) | (1<<UCSZ11) | (1<<UCSZ10); /* data-8bit(011) */ \
sei(); \
} while(0)
#else
# error "USART configuration is needed."
#endif
and these blocks to /tmk_keyboard-master/converter/m0110_usb_bluefruit/Makefile
@line 25 , after CONFIG_H = config.h
BLUEFRUIT_TRACE_SERIAL=true
@line 96 , before include $(TOP_DIR)/protocol/lufa.mk
include $(TOP_DIR)/protocol/bluefruit.mk
this results in a Make error:
Compiling C: ../../protocol/bluefruit/main.c
avr-gcc -c -mmcu=atmega32u4 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DPROTOCOL_BLUEFRUIT -DPROTOCOL_PJRC -DMOUSEKEY_ENABLE -DMOUSE_ENABLE -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_m0110_lufa/protocol/bluefruit/main.lst -I. -I../.. -I../../protocol/bluefruit -I../../protocol/pjrc -I../../protocol -I../../common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_m0110_lufa_protocol_bluefruit_main.o.d ../../protocol/bluefruit/main.c -o obj_m0110_lufa/protocol/bluefruit/main.o
../../protocol/bluefruit/main.c: In function 'main':
../../protocol/bluefruit/main.c:107:17: error: too few arguments to function 'suspend_power_down'
suspend_power_down();
^
In file included from ../../protocol/bluefruit/main.c:33:0:
../../common/suspend.h:9:6: note: declared here
void suspend_power_down(uint8_t timeout);
^
make: *** [obj_m0110_lufa/protocol/bluefruit/main.o] Error 1
So. i will keep exploring.
—Æ