Configuring UART ports
Programs such as
addTwoNums
call the SER_GetChar()
and SER_PutChar()
functions to output ASCII characters to a terminal. The Retarget.c
file redefines the fgetc()
and fputc()
functions, which, in turn, call SER_GetChar()
and SER_PutChar()
. These low-level functions illustrate some important I/O models that we'll explore using a program that checks if a string entered is a palindrome (for example, radar, civic, and level are palindromes). We'll call this recipe palindrome_c3v0
.
How to do it…
Follow the steps outlined to configure UART ports:
- Create a project named palindrome; use the RTE manager to configure the board as we did for
addTwoNums_c3v0
folder, in the Performing arithemetic operations recipe. - Create a file named ...
Get ARM® Cortex® M4 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.