Serial port

Dependencies:   BSP_DISCO_F746NG

main.cpp

Committer:
iliatumash
Date:
2020-11-13
Revision:
0:46ab42e88365

File content as of revision 0:46ab42e88365:

#include "mbed.h"

InterruptIn sw(USER_BUTTON);
EventQueue queue(32 * EVENTS_EVENT_SIZE);
void rise_handler(void)
{
    queue.call(printf, "Vypis do serioveho portu\n");
  
}

Thread thread;
int main()
{   
    thread.start(callback(&queue, &EventQueue::dispatch_forever));
    sw.rise(rise_handler);       
}