32bb2395c2
Kernel timeouts have always been a 32 bit integer despite the existence of generation macros, and existing code has been inconsistent about using them. Upcoming commits are going to make the timeout arguments opaque, so fix things up to be rigorously correct. Changes include: + Adding a K_TIMEOUT_EQ() macro for code that needs to compare timeout values for equality (e.g. with K_FOREVER or K_NO_WAIT). + Adding a k_msleep() synonym for k_sleep() which can continue to take integral arguments as k_sleep() moves away to timeout arguments. + Pervasively using the K_MSEC(), K_SECONDS(), et. al. macros to generate timeout arguments. + Removing the usage of K_NO_WAIT as the final argument to K_THREAD_DEFINE(). This is just a count of milliseconds and we need to use a zero. This patch include no logic changes and should not affect generated code at all. Signed-off-by: Andy Ross <andrew.j.ross@intel.com> |
||
---|---|---|
.. | ||
src | ||
CMakeLists.txt | ||
README.txt | ||
prj.conf | ||
sample.yaml |
README.txt
NFC Sample App -------------- This is a simple application to test an elementary signal-through with NFC module connected to the second UART. Build and run ------------- To test the serial line routines, open a terminal window and type: nc -l 8888 Open another terminal window and type: For QEMU x86: mkdir build; cd build cmake -DBOARD=qemu_x86 .. make run For QEMU ARM: mkdir build; cd build cmake -DBOARD=qemu_cortex_m3 .. make run Sample output ------------- Write some random text on the nc terminal window. The terminal window running qemu must display: For QEMU x86: [QEMU] CPU: qemu32 Sample app running on: x86 uart1_init() done uart1_isr: 61 73 64 73 61 64 73 0a (8 bytes) For QEMU ARM: [QEMU] CPU: cortex-m3 Sample app running on: arm uart1_init() done uart1_isr: 61 (1 bytes) uart1_isr: 73 (1 bytes) uart1_isr: 64 (1 bytes) uart1_isr: 73 (1 bytes) uart1_isr: 61 (1 bytes) uart1_isr: 0a (1 bytes) uart1_isr: 73 (1 bytes) uart1_isr: 73 (1 bytes)