UART example for acd52832.

Dependencies:   adc52832_common mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /** Made by: Karlo Milicevic, 2017. 
00002  * aconno.de
00003  */
00004 
00005 #include "mbed.h"
00006 #include "acd52832_bsp.h"
00007 
00008 #include <stdio.h>
00009 #include "nrf52_uart.h"
00010 NRF52_UART uart(p27, p31, Baud9600);
00011 char buffer[255];
00012 #define SEND(...) {uint8_t len = sprintf(buffer, __VA_ARGS__); uart.send(buffer, len);}
00013 
00014 int main(){
00015     uint32_t c = 0;
00016     while(true){
00017         SEND("%u\n\r", c++);
00018         wait_ms(100);
00019     }
00020 }