Test MLDP code for Microchip RN4020 BLE
Dependencies: mbed-src mbed-rtos MODSERIAL
main.h
- Committer:
- edodm85
- Date:
- 2017-05-13
- Revision:
- 0:49a7ebfbee00
- Child:
- 2:6dd5f9113367
File content as of revision 0:49a7ebfbee00:
/* RN4020 - mbed vcc - 3.3V gnd - gnd rx - tx(p28) tx - rx(p27) wake_hw - p5 cmd/mldp - p6 wake_sw - p7 */ #include "mbed.h" #include "MODSERIAL.h" #include "cmsis_os.h" MODSERIAL pc(USBTX, USBRX); MODSERIAL ble_rn(p28, p27); DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalOut led3(LED3); DigitalOut led4(LED4); DigitalOut wakeHw(p5); DigitalOut cmdMldp(p6); DigitalOut wakeSw(p7); // UUID char suuid[] = "00035b0058e607dd021a08123a000300"; // service char uuidR[] = "00035b0258e607dd021a08123a000300"; // read char uuidW[] = "00035b0358e607dd021a08123a000300"; // write bool new_from_pc = false; bool new_from_ble = false; bool start_ble = false; char pcChar[20]; char blueChar[20]; char blueCharTemp[20]; char buffer[200]; //THREAD void read_thread(void const *argument); osThreadId tencid; osThreadDef(read_thread, osPriorityNormal, DEFAULT_STACK_SIZE);