Hello,
I want to add control over UART to ble_app_blink_c project.
SDK is version 16,I copied <SDK>/examples/ble_central/ble_app_blinky_c folder and made <SDK>/examples/ble_central/ble_app_blinky_c_uart folder from it, the project is attached, you can unzip it to <SDK>/examples/ble_central/ folder to try it out.
I copied uart_init() from ble_app_uart_c project and I added the required files from libraries/fifo and libraries/uart and I added required lines to sdk_config.h :
/* Universal Asynchronous Receiver-Transmitter */
#define UART_PRESENT
#define UART_COUNT 1
/* Universal Asynchronous Receiver-Transmitter with DMA */
#define UARTE_PRESENT
#define UARTE_COUNT 1
#define UARTE0_EASYDMA_MAXCNT_SIZE 8
//==========================================================
// <q> APP_FIFO_ENABLED - app_fifo - Software FIFO implementation
#ifndef APP_FIFO_ENABLED
#define APP_FIFO_ENABLED 1
#endif
// <e> APP_UART_ENABLED - app_uart - UART driver
//==========================================================
#ifndef APP_UART_ENABLED
#define APP_UART_ENABLED 1
#endif
// <o> APP_UART_DRIVER_INSTANCE - UART instance used
// <0=> 0
#ifndef APP_UART_DRIVER_INSTANCE
#define APP_UART_DRIVER_INSTANCE 0
#endif
Everything compiles fine but I can't make UART work with ble_blinky_c.
printf("text\r\n); doesn't output text to serial monitor (Putty).
Please can you help me with providing code lines for reading from and writing to UART in the ble_blinky_c project and tell me what is the right way to add UART support to a ble app?
Thanks in advance,
Tom