back up of work during May 2019

Dependencies:   microbit

Committer:
tht216
Date:
Wed Jun 05 15:21:14 2019 +0000
Branch:
class_implmentation
Revision:
6:f372773ad32f
TODO:; 1. multi keypresses; 2. integration

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tht216 6:f372773ad32f 1 #ifndef BITBOARD_H
tht216 6:f372773ad32f 2 #define BITBOARD_H
tht216 6:f372773ad32f 3
tht216 6:f372773ad32f 4 #include "MicroBit.h"
tht216 6:f372773ad32f 5 #include "mbed.h"
tht216 6:f372773ad32f 6 #include "ble/BLE.h"
tht216 6:f372773ad32f 7 #include "KeyboardService.h"
tht216 6:f372773ad32f 8 #include "MicroBitPin.h"
tht216 6:f372773ad32f 9 #include "examples_common.h"
tht216 6:f372773ad32f 10 #include "MicroBit.h"
tht216 6:f372773ad32f 11 #include "keymap.h"
tht216 6:f372773ad32f 12
tht216 6:f372773ad32f 13 class bitboard {
tht216 6:f372773ad32f 14 protected:
tht216 6:f372773ad32f 15 KeyboardService* kbdServicePtr;
tht216 6:f372773ad32f 16 const char* DEVICE_NAME;
tht216 6:f372773ad32f 17 const char* SHORT_DEVICE_NAME;
tht216 6:f372773ad32f 18 uint8_t Buffer;
tht216 6:f372773ad32f 19 public:
tht216 6:f372773ad32f 20 // MicroBit &uBit;
tht216 6:f372773ad32f 21 BLE &ble;
tht216 6:f372773ad32f 22 bitboard(/**MicroBit &_uBit,**/ BLE &_ble, KeyboardService* _kbdServicePtr, const char* _DEVICE_NAME, const char* _SHORT_DEVICE_NAME);
tht216 6:f372773ad32f 23 ~bitboard();
tht216 6:f372773ad32f 24
tht216 6:f372773ad32f 25 void init();
tht216 6:f372773ad32f 26 // void start_service();
tht216 6:f372773ad32f 27 // void start_broadcast();
tht216 6:f372773ad32f 28 void onDisconnect(const Gap::DisconnectionCallbackParams_t *params);
tht216 6:f372773ad32f 29 void onConnect(const Gap::ConnectionCallbackParams_t *params);
tht216 6:f372773ad32f 30 void onButtonA(MicroBitEvent e);
tht216 6:f372773ad32f 31 void send_keypress();
tht216 6:f372773ad32f 32 uint8_t get_keycode(char c);
tht216 6:f372773ad32f 33
tht216 6:f372773ad32f 34 };
tht216 6:f372773ad32f 35
tht216 6:f372773ad32f 36
tht216 6:f372773ad32f 37
tht216 6:f372773ad32f 38 #endif