High level Bluetooth Low Energy API and radio abstraction layer
Fork of BLE_API by
Revision 1:fd3ec64b2345, committed 2013-12-04
- Comitter:
- ktownsend
- Date:
- Wed Dec 04 07:20:24 2013 +0000
- Parent:
- 0:ace2e8d3ce79
- Child:
- 2:ffc5216bd2cc
- Commit message:
- Added LPC1768 pinout
Changed in this revision
--- a/hw/bleradio.h Fri Nov 29 14:42:22 2013 +0000 +++ b/hw/bleradio.h Wed Dec 04 07:20:24 2013 +0000 @@ -20,7 +20,7 @@ /* ToDo: Force constructor with event handler callback */ /* These functions must be defined in the sub-class */ - virtual ble_error_t attach(void (*fptr)(void)); + //virtual ble_error_t attach(void (*fptr)(void)); virtual ble_error_t addService(BLEService &) = 0; virtual ble_error_t updateValue(uint8_t, uint8_t, uint8_t[], uint16_t) = 0; virtual ble_error_t start(void) = 0;
--- a/hw/nrf51822.cpp Fri Nov 29 14:42:22 2013 +0000 +++ b/hw/nrf51822.cpp Wed Dec 04 07:20:24 2013 +0000 @@ -22,7 +22,8 @@ event is raised by the radio HW. */ /**************************************************************************/ -nRF51822::nRF51822() : uart(P0_4, P0_0) +//nRF51822::nRF51822() : uart(P0_4, P0_0) /* LPC812 */ +nRF51822::nRF51822() : uart(p9, p10) /* LPC1768 using apps board */ { /* Setup the nRF UART interface */ uart.baud(9600); @@ -31,7 +32,8 @@ uart.attach(this, &nRF51822::uartCallback); /* Add flow control for UART (required by the nRF51822) */ - uart.set_flow_control(Serial::RTSCTS, P0_6, P0_8); + //uart.set_flow_control(Serial::RTSCTS, P0_6, P0_8); /* LPC812 */ + uart.set_flow_control(Serial::RTSCTS, p30, p29); /* LPC1768 */ /* Reset the service counter */ serviceCount = 0; @@ -51,10 +53,10 @@ */ /**************************************************************************/ -ble_error_t nRF51822::attach(void (*fptr)(void)) -{ - return BLE_ERROR_NONE; -} +//ble_error_t nRF51822::attach(void (*fptr)(void)) +//{ +// return BLE_ERROR_NONE; +//} /**************************************************************************/ /*!
--- a/hw/nrf51822.h Fri Nov 29 14:42:22 2013 +0000 +++ b/hw/nrf51822.h Wed Dec 04 07:20:24 2013 +0000 @@ -13,7 +13,7 @@ virtual ~nRF51822(void); /* Functions that mus be implemented from NRFRadio */ - virtual ble_error_t attach(void (*fptr)(void)); + //virtual ble_error_t attach(void (*fptr)(void)); virtual ble_error_t addService(BLEService &); virtual ble_error_t updateValue(uint8_t, uint8_t, uint8_t[], uint16_t); virtual ble_error_t start(void);
--- a/mbed-src-flowcontrol.lib Fri Nov 29 14:42:22 2013 +0000 +++ b/mbed-src-flowcontrol.lib Wed Dec 04 07:20:24 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/bogdanm/code/mbed-src-flowcontrol/#8804ac57fc7e +http://mbed.org/users/bogdanm/code/mbed-src-flowcontrol/#d8b836b18f9c