back up of work during May 2019
Dependencies: microbit
bitboard.h
00001 #ifndef BITBOARD_H 00002 #define BITBOARD_H 00003 00004 #include "MicroBit.h" 00005 #include "mbed.h" 00006 #include "ble/BLE.h" 00007 #include "KeyboardService.h" 00008 #include "MicroBitPin.h" 00009 #include "examples_common.h" 00010 #include "MicroBit.h" 00011 #include "keymap.h" 00012 00013 class bitboard { 00014 protected: 00015 KeyboardService* kbdServicePtr; 00016 const char* DEVICE_NAME; 00017 const char* SHORT_DEVICE_NAME; 00018 uint8_t Buffer; 00019 public: 00020 // MicroBit &uBit; 00021 BLE &ble; 00022 bitboard(/**MicroBit &_uBit,**/ BLE &_ble, KeyboardService* _kbdServicePtr, const char* _DEVICE_NAME, const char* _SHORT_DEVICE_NAME); 00023 ~bitboard(); 00024 00025 void init(); 00026 // void start_service(); 00027 // void start_broadcast(); 00028 void onDisconnect(const Gap::DisconnectionCallbackParams_t *params); 00029 void onConnect(const Gap::ConnectionCallbackParams_t *params); 00030 void onButtonA(MicroBitEvent e); 00031 void send_keypress(); 00032 uint8_t get_keycode(char c); 00033 00034 }; 00035 00036 00037 00038 #endif
Generated on Mon Jul 18 2022 14:25:12 by 1.7.2