Page last edited December 31, 2013
Text editor powered by tinymce.
Page last edited December 31, 2013
Text editor powered by tinymce.
IBM PC/XT Keyboard (1981):
Page last edited December 31, 2013
Text editor powered by tinymce.
Page last edited December 31, 2013
Text editor powered by tinymce.
Page last edited December 31, 2013
Text editor powered by tinymce.
Page last edited December 31, 2013
Text editor powered by tinymce.
Page last edited December 31, 2013
Text editor powered by tinymce.
Page last edited December 31, 2013
Text editor powered by tinymce.
Page last edited December 31, 2013
Text editor powered by tinymce.
#ifndef KEYBOARDFIRMWARE_CONFIG_H #define KEYBOARDFIRMWARE_CONFIG_H 1 #define RESET_BUTTON_PIN 8 #define PAIR_LED_PIN 7 #define PAIR_BUTTON_PIN 6 #define OUTPUT_LED_PIN 5 #define KEY_LED_PIN 4 #define OUTPUT_LED_ON HIGH #define OUTPUT_LED_OFF LOW #define DEBUGGING_LED 13 #define DEBUGGING_LED_ON HIGH #define DEBUGGING_LED_OFF LOW #define DEBUG_ENABLE true #define EXTRAKEY_ENABLE 1 #define MOUSEKEY_ENABLE 1 #define MATRIX_ROWS 17 #define MATRIX_COLS 8 #define PS2_CLOCK_PORT PORTD #define PS2_CLOCK_PIN PIND #define PS2_CLOCK_DDR DDRD #define PS2_CLOCK_BIT 1 #define PS2_DATA_PORT PORTD #define PS2_DATA_PIN PIND #define PS2_DATA_DDR DDRD #define PS2_DATA_BIT 0 #define PS2_USE_BUSYWAIT true #ifndef PS2_MATRIX_HAS_GHOSTING #define PS2_MATRIX_HAS_GHOSTING false #endif #endif
#ifndef KEYBOARDFIRMWARE_CONFIG_H #define KEYBOARDFIRMWARE_CONFIG_H 1 #define RESET_BUTTON_PIN 8 #define PAIR_LED_PIN 7 #define PAIR_BUTTON_PIN 6 #define OUTPUT_LED_PIN 5 #define KEY_LED_PIN 4 #define OUTPUT_LED_ON HIGH #define OUTPUT_LED_OFF LOW #define DEBUGGING_LED 13 #define DEBUGGING_LED_ON HIGH #define DEBUGGING_LED_OFF LOW #define DEBUG_ENABLE true #define EXTRAKEY_ENABLE 1 #define MOUSEKEY_ENABLE 1 #define MATRIX_ROWS 17 #define MATRIX_COLS 8 #define PS2_CLOCK_PORT PORTD #define PS2_CLOCK_PIN PIND #define PS2_CLOCK_DDR DDRD #define PS2_CLOCK_BIT 1 #define PS2_DATA_PORT PORTD #define PS2_DATA_PIN PIND #define PS2_DATA_DDR DDRD #define PS2_DATA_BIT 0 #define PS2_USE_BUSYWAIT true #ifndef PS2_MATRIX_HAS_GHOSTING #define PS2_MATRIX_HAS_GHOSTING false #endif #endif
Page last edited December 31, 2013
Text editor powered by tinymce.
BluefruitHost host; PS2MatrixCodeset3 matrix; static uint16_t reset_press_time = 0; void setup() { pinMode(KEY_LED_PIN, INPUT); pinMode(PAIR_LED_PIN, INPUT); pinMode(PAIR_BUTTON_PIN, OUTPUT); pinMode(RESET_BUTTON_PIN, OUTPUT); pinMode(DEBUGGING_LED, OUTPUT); digitalWrite(PAIR_BUTTON_PIN, LOW); // write high for 5 seconds to reset pairing digitalWrite(RESET_BUTTON_PIN, LOW); // pull low to reset the bluefruit module digitalWrite(OUTPUT_LED_PIN, OUTPUT_LED_OFF); #if DEBUG_ENABLE debug_enable = true; while (!Serial) ; #endif print_set_sendchar(arduino_tmk_sendchar); dprint("started logging\n"); digitalWrite(DEBUGGING_LED, DEBUGGING_LED_ON); KeyboardFirmware.begin(host, matrix); digitalWrite(DEBUGGING_LED, DEBUGGING_LED_OFF); digitalWrite(RESET_BUTTON_PIN, HIGH); // turn on bluefruit }
BluefruitHost host; PS2MatrixCodeset3 matrix; static uint16_t reset_press_time = 0; void setup() { pinMode(KEY_LED_PIN, INPUT); pinMode(PAIR_LED_PIN, INPUT); pinMode(PAIR_BUTTON_PIN, OUTPUT); pinMode(RESET_BUTTON_PIN, OUTPUT); pinMode(DEBUGGING_LED, OUTPUT); digitalWrite(PAIR_BUTTON_PIN, LOW); // write high for 5 seconds to reset pairing digitalWrite(RESET_BUTTON_PIN, LOW); // pull low to reset the bluefruit module digitalWrite(OUTPUT_LED_PIN, OUTPUT_LED_OFF); #if DEBUG_ENABLE debug_enable = true; while (!Serial) ; #endif print_set_sendchar(arduino_tmk_sendchar); dprint("started logging\n"); digitalWrite(DEBUGGING_LED, DEBUGGING_LED_ON); KeyboardFirmware.begin(host, matrix); digitalWrite(DEBUGGING_LED, DEBUGGING_LED_OFF); digitalWrite(RESET_BUTTON_PIN, HIGH); // turn on bluefruit }
void loop() { // this the main hook into the tmk firmware that handles all the heavy lifting KeyboardFirmware.runTask(); // Now sync the pair button light with the output pin if (digitalRead(PAIR_LED_PIN) == HIGH) { digitalWrite(OUTPUT_LED_PIN, OUTPUT_LED_ON); } else { digitalWrite(OUTPUT_LED_PIN, OUTPUT_LED_OFF); } // receive any messages from Bluefruit and output them if necessary unsigned char c; while (Serial1.available()) { c = (unsigned char) Serial1.read(); if (debug_enable) Serial.write(c); } // next we'll check if the reset key was held down for 5 seconds if (reset_press_time && timer_elapsed(reset_press_time) > 5000) { dprintf("= setting reset low\n"); digitalWrite(RESET_BUTTON_PIN, LOW); delay(10); digitalWrite(RESET_BUTTON_PIN, HIGH); dprintf("= restored reset high\n"); reset_press_time = 0; } }
void loop() { // this the main hook into the tmk firmware that handles all the heavy lifting KeyboardFirmware.runTask(); // Now sync the pair button light with the output pin if (digitalRead(PAIR_LED_PIN) == HIGH) { digitalWrite(OUTPUT_LED_PIN, OUTPUT_LED_ON); } else { digitalWrite(OUTPUT_LED_PIN, OUTPUT_LED_OFF); } // receive any messages from Bluefruit and output them if necessary unsigned char c; while (Serial1.available()) { c = (unsigned char) Serial1.read(); if (debug_enable) Serial.write(c); } // next we'll check if the reset key was held down for 5 seconds if (reset_press_time && timer_elapsed(reset_press_time) > 5000) { dprintf("= setting reset low\n"); digitalWrite(RESET_BUTTON_PIN, LOW); delay(10); digitalWrite(RESET_BUTTON_PIN, HIGH); dprintf("= restored reset high\n"); reset_press_time = 0; } }
Page last edited December 31, 2013
Text editor powered by tinymce.
START_KEYMAPS KEYMAPS = { /* 0: default * ,---. ,---------------. ,---------------. ,---------------. ,-----------. * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| * `---' `---------------' `---------------' `---------------' `-----------' * ,-----------------------------------------------------------. ,-----------. ,---------------. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BS | |Ins|Hom|PgU| |NmL| /| *| -| * |-----------------------------------------------------------| |-----------| |---------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| | * |-----------------------------------------------------------| `-----------' |-----------| +| * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '| #|Retu| | 4| 5| 6| | * |-----------------------------------------------------------| ,---. |---------------| * |Shif| \| Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | * |-----------------------------------------------------------| ,-----------. |-----------|Ent| * |Ctrl| |Alt | Space |Alt | |Ctrl| |Lef|Dow|Rig| | 0| .| | * `----' `---------------------------------------' `----' `-----------' `---------------' */ PS2_CODESET3_KEYMAP( FN2, F14, F15, F16, F17, F18, F19, F20, F21, F22, PSCR,SLCK, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,ESC, GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, SLCK,INT4, TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, PAUS,INT5, LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, UP, P4, P5, P6, PCMM, APP, INT6, LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, LEFT,PAUS,RGHT, P1, P2, P3, PENT, RGUI,LGUI, FN0, LALT, SPC, RALT, RCTL, DOWN, NO, P0, PDOT,NO ), PS2_CODESET3_KEYMAP( TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN1, LGUI,VOLU, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, FN2, APP, VOLD, BTN1,MS_U,BTN2,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, MS_L,MS_D,MS_R,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, TRNS, TRNS, LGUI, APP, TRNS, TRNS,TRNS,TRNS,TRNS ), }; FN_ACTIONS = { ACTION_FUNCTION(0), ACTION_FUNCTION(1), ACTION_FUNCTION(2), }; KEYMAPS_FINISHED
START_KEYMAPS KEYMAPS = { /* 0: default * ,---. ,---------------. ,---------------. ,---------------. ,-----------. * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| * `---' `---------------' `---------------' `---------------' `-----------' * ,-----------------------------------------------------------. ,-----------. ,---------------. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BS | |Ins|Hom|PgU| |NmL| /| *| -| * |-----------------------------------------------------------| |-----------| |---------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| | * |-----------------------------------------------------------| `-----------' |-----------| +| * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '| #|Retu| | 4| 5| 6| | * |-----------------------------------------------------------| ,---. |---------------| * |Shif| \| Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | * |-----------------------------------------------------------| ,-----------. |-----------|Ent| * |Ctrl| |Alt | Space |Alt | |Ctrl| |Lef|Dow|Rig| | 0| .| | * `----' `---------------------------------------' `----' `-----------' `---------------' */ PS2_CODESET3_KEYMAP( FN2, F14, F15, F16, F17, F18, F19, F20, F21, F22, PSCR,SLCK, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,ESC, GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, SLCK,INT4, TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, PAUS,INT5, LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, UP, P4, P5, P6, PCMM, APP, INT6, LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, LEFT,PAUS,RGHT, P1, P2, P3, PENT, RGUI,LGUI, FN0, LALT, SPC, RALT, RCTL, DOWN, NO, P0, PDOT,NO ), PS2_CODESET3_KEYMAP( TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN1, LGUI,VOLU, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, FN2, APP, VOLD, BTN1,MS_U,BTN2,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, MS_L,MS_D,MS_R,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, TRNS, TRNS, LGUI, APP, TRNS, TRNS,TRNS,TRNS,TRNS ), }; FN_ACTIONS = { ACTION_FUNCTION(0), ACTION_FUNCTION(1), ACTION_FUNCTION(2), }; KEYMAPS_FINISHED
Page last edited December 31, 2013
Text editor powered by tinymce.
FN_ACTIONS = { ACTION_FUNCTION(0), ACTION_FUNCTION(1), ACTION_FUNCTION(2), };
FN_ACTIONS = { ACTION_FUNCTION(0), ACTION_FUNCTION(1), ACTION_FUNCTION(2), };
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { bool pressed = record->event.pressed; dprint("== action function called"); dprintln(); dprint("= id: "); debug_dec(id); dprintln(); dprint("= pressed: "); debug_dec(record->event.pressed); dprintln(); if (id == 0) { if (pressed) { layer_on(1); } else { layer_clear(); } } else if (id == 1) { // bluefruit pair button if (pressed) { dprintf("= setting pair button HIGH\n"); digitalWrite(PAIR_BUTTON_PIN, HIGH); } else { dprintf("= setting pair button LOW\n"); digitalWrite(PAIR_BUTTON_PIN, LOW); } } else if (id == 2) { if (pressed) { if (reset_press_time == 0) { reset_press_time = timer_read(); } } else { reset_press_time = 0; } } dprint("== end of action function\n"); }
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { bool pressed = record->event.pressed; dprint("== action function called"); dprintln(); dprint("= id: "); debug_dec(id); dprintln(); dprint("= pressed: "); debug_dec(record->event.pressed); dprintln(); if (id == 0) { if (pressed) { layer_on(1); } else { layer_clear(); } } else if (id == 1) { // bluefruit pair button if (pressed) { dprintf("= setting pair button HIGH\n"); digitalWrite(PAIR_BUTTON_PIN, HIGH); } else { dprintf("= setting pair button LOW\n"); digitalWrite(PAIR_BUTTON_PIN, LOW); } } else if (id == 2) { if (pressed) { if (reset_press_time == 0) { reset_press_time = timer_read(); } } else { reset_press_time = 0; } } dprint("== end of action function\n"); }
void BluefruitHost::begin() { Serial1.begin(9600); } uint8_t BluefruitHost::getLEDs() { // not implemented on Bluefruit; method is virtual so feel free to override return 0; } void BluefruitHost::sendKeyboard(KeyboardReport &report) { bluefruit_trace_header(); dprintf("(keyboard) "); _serial_send(0xFD); _serial_send(report.getModifiers()); _serial_send(report.getReserved()); for (short i = 0; i < REPORT_SIZE; i++) { _serial_send(report.getKey(i)); } bluefruit_trace_footer(); } void BluefruitHost::sendMouse(MouseReport &report) { bluefruit_trace_header(); dprintf("(mouse) "); _serial_send(0xFD); _serial_send(0x00); _serial_send(0x03); _serial_send(report.getButtons()); _serial_send(report.getX()); _serial_send(report.getY()); _serial_send(report.getV()); // TODO: determine if bluefruit _serial_send(report.getH()); // supports mouse wheel - BCG _serial_send(0x00); bluefruit_trace_footer(); };
void BluefruitHost::begin() { Serial1.begin(9600); } uint8_t BluefruitHost::getLEDs() { // not implemented on Bluefruit; method is virtual so feel free to override return 0; } void BluefruitHost::sendKeyboard(KeyboardReport &report) { bluefruit_trace_header(); dprintf("(keyboard) "); _serial_send(0xFD); _serial_send(report.getModifiers()); _serial_send(report.getReserved()); for (short i = 0; i < REPORT_SIZE; i++) { _serial_send(report.getKey(i)); } bluefruit_trace_footer(); } void BluefruitHost::sendMouse(MouseReport &report) { bluefruit_trace_header(); dprintf("(mouse) "); _serial_send(0xFD); _serial_send(0x00); _serial_send(0x03); _serial_send(report.getButtons()); _serial_send(report.getX()); _serial_send(report.getY()); _serial_send(report.getV()); // TODO: determine if bluefruit _serial_send(report.getH()); // supports mouse wheel - BCG _serial_send(0x00); bluefruit_trace_footer(); };
/* +-----------------+-------------------+-------+ | Consumer Key | Bit Map | Hex | +-----------------+-------------------+-------+ | Home | 00000001 00000000 | 01 00 | | KeyboardLayout | 00000010 00000000 | 02 00 | | Search | 00000100 00000000 | 04 00 | | Snapshot | 00001000 00000000 | 08 00 | | VolumeUp | 00010000 00000000 | 10 00 | | VolumeDown | 00100000 00000000 | 20 00 | | Play/Pause | 01000000 00000000 | 40 00 | | Fast Forward | 10000000 00000000 | 80 00 | | Rewind | 00000000 00000001 | 00 01 | | Scan Next Track | 00000000 00000010 | 00 02 | | Scan Prev Track | 00000000 00000100 | 00 04 | | Random Play | 00000000 00001000 | 00 08 | | Stop | 00000000 00010000 | 00 10 | +-------------------------------------+-------+ */ #define CONSUMER2BLUEFRUIT(usage) \ (usage == AUDIO_MUTE ? 0x0000 : \ (usage == AUDIO_VOL_UP ? 0x1000 : \ (usage == AUDIO_VOL_DOWN ? 0x2000 : \ (usage == TRANSPORT_NEXT_TRACK ? 0x0002 : \ (usage == TRANSPORT_PREV_TRACK ? 0x0004 : \ (usage == TRANSPORT_STOP ? 0x0010 : \ (usage == TRANSPORT_STOP_EJECT ? 0x0000 : \ (usage == TRANSPORT_PLAY_PAUSE ? 0x4000 : \ (usage == AL_CC_CONFIG ? 0x0000 : \ (usage == AL_EMAIL ? 0x0000 : \ (usage == AL_CALCULATOR ? 0x0000 : \ (usage == AL_LOCAL_BROWSER ? 0x0000 : \ (usage == AC_SEARCH ? 0x0400 : \ (usage == AC_HOME ? 0x0100 : \ (usage == AC_BACK ? 0x0000 : \ (usage == AC_FORWARD ? 0x0000 : \ (usage == AC_STOP ? 0x0000 : \ (usage == AC_REFRESH ? 0x0000 : \ (usage == AC_BOOKMARKS ? 0x0000 : 0))))))))))))))))))) void BluefruitHost::sendConsumer(uint16_t data) { if (data == _last_consumer_data) return; _last_consumer_data = data; uint16_t bitmap = CONSUMER2BLUEFRUIT(data); bluefruit_trace_header(); dprintf("(consumer) "); _serial_send(0xFD); _serial_send(0x00); _serial_send(0x02); _serial_send((bitmap>>8)&0xFF); _serial_send(bitmap&0xFF); _serial_send(0x00); _serial_send(0x00); _serial_send(0x00); _serial_send(0x00); bluefruit_trace_footer(); }; void BluefruitHost::sendSystem(uint16_t data) { // not implemented in Bluefruit }
/* +-----------------+-------------------+-------+ | Consumer Key | Bit Map | Hex | +-----------------+-------------------+-------+ | Home | 00000001 00000000 | 01 00 | | KeyboardLayout | 00000010 00000000 | 02 00 | | Search | 00000100 00000000 | 04 00 | | Snapshot | 00001000 00000000 | 08 00 | | VolumeUp | 00010000 00000000 | 10 00 | | VolumeDown | 00100000 00000000 | 20 00 | | Play/Pause | 01000000 00000000 | 40 00 | | Fast Forward | 10000000 00000000 | 80 00 | | Rewind | 00000000 00000001 | 00 01 | | Scan Next Track | 00000000 00000010 | 00 02 | | Scan Prev Track | 00000000 00000100 | 00 04 | | Random Play | 00000000 00001000 | 00 08 | | Stop | 00000000 00010000 | 00 10 | +-------------------------------------+-------+ */ #define CONSUMER2BLUEFRUIT(usage) \ (usage == AUDIO_MUTE ? 0x0000 : \ (usage == AUDIO_VOL_UP ? 0x1000 : \ (usage == AUDIO_VOL_DOWN ? 0x2000 : \ (usage == TRANSPORT_NEXT_TRACK ? 0x0002 : \ (usage == TRANSPORT_PREV_TRACK ? 0x0004 : \ (usage == TRANSPORT_STOP ? 0x0010 : \ (usage == TRANSPORT_STOP_EJECT ? 0x0000 : \ (usage == TRANSPORT_PLAY_PAUSE ? 0x4000 : \ (usage == AL_CC_CONFIG ? 0x0000 : \ (usage == AL_EMAIL ? 0x0000 : \ (usage == AL_CALCULATOR ? 0x0000 : \ (usage == AL_LOCAL_BROWSER ? 0x0000 : \ (usage == AC_SEARCH ? 0x0400 : \ (usage == AC_HOME ? 0x0100 : \ (usage == AC_BACK ? 0x0000 : \ (usage == AC_FORWARD ? 0x0000 : \ (usage == AC_STOP ? 0x0000 : \ (usage == AC_REFRESH ? 0x0000 : \ (usage == AC_BOOKMARKS ? 0x0000 : 0))))))))))))))))))) void BluefruitHost::sendConsumer(uint16_t data) { if (data == _last_consumer_data) return; _last_consumer_data = data; uint16_t bitmap = CONSUMER2BLUEFRUIT(data); bluefruit_trace_header(); dprintf("(consumer) "); _serial_send(0xFD); _serial_send(0x00); _serial_send(0x02); _serial_send((bitmap>>8)&0xFF); _serial_send(bitmap&0xFF); _serial_send(0x00); _serial_send(0x00); _serial_send(0x00); _serial_send(0x00); bluefruit_trace_footer(); }; void BluefruitHost::sendSystem(uint16_t data) { // not implemented in Bluefruit }
Page last edited December 31, 2013
Text editor powered by tinymce.
Page last edited December 31, 2013
Text editor powered by tinymce.
Page last edited December 31, 2013
Text editor powered by tinymce.
Page last edited December 31, 2013
Text editor powered by tinymce.