ble uart
1.0.0
ble-uart is a low-power Bluetooth serial port source code based on nordic Bluetooth chip and keil development environment. I hope to help Bluetooth enthusiasts!
File: pca10001.h
#define RX_PIN_NUMBER 12
#define TX_PIN_NUMBER 11
#define CTS_PIN_NUMBER 10
#define RTS_PIN_NUMBER 8
#define HWFC falseFile: user_ble_control.h
#define DISCONNECT_BLE_SWITCH 13
#define WAKEUP_BLE_SWITCH 23
#define BLE_STATUS 29DISCONNECT_BLE_SWITCH : [in] Falling edge is valid, disconnect the currently established Bluetooth connection, broadcast and wait for connection againWAKEUP_BLE_SWITCH : [ in ]Wake up the Bluetooth chip in system off on the falling edge, the low-level serial port is working normally, and the high-level serial port power is turned offBLE_STATUS : [ out ] High level indicates that Bluetooth is connected, low level indicates that Bluetooth is waiting to be connected
AT+ADVEN:system offandsystem onmode commands
AT+ADVEN0 : Decide whether Bluetooth enters system off , Bluetooth enters system off step, a 发送AT+ADVEN0 , b WAKEUP_BLE_SWITCH 输入高电平AT+ADVEN1 : Turn off system off mode