Serial port

Dependencies:   BSP_DISCO_F746NG

Committer:
iliatumash
Date:
Fri Nov 13 17:37:03 2020 +0000
Revision:
0:46ab42e88365
Uloha_6;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
iliatumash 0:46ab42e88365 1 #include "mbed.h"
iliatumash 0:46ab42e88365 2
iliatumash 0:46ab42e88365 3 InterruptIn sw(USER_BUTTON);
iliatumash 0:46ab42e88365 4 EventQueue queue(32 * EVENTS_EVENT_SIZE);
iliatumash 0:46ab42e88365 5 void rise_handler(void)
iliatumash 0:46ab42e88365 6 {
iliatumash 0:46ab42e88365 7 queue.call(printf, "Vypis do serioveho portu\n");
iliatumash 0:46ab42e88365 8
iliatumash 0:46ab42e88365 9 }
iliatumash 0:46ab42e88365 10
iliatumash 0:46ab42e88365 11 Thread thread;
iliatumash 0:46ab42e88365 12 int main()
iliatumash 0:46ab42e88365 13 {
iliatumash 0:46ab42e88365 14 thread.start(callback(&queue, &EventQueue::dispatch_forever));
iliatumash 0:46ab42e88365 15 sw.rise(rise_handler);
iliatumash 0:46ab42e88365 16 }