46 char aDebugString[150u];
48 #ifdef REDIRECT_OUTPUT_TO_UART 50 #include <drivers/uart/adi_uart.h> 51 #include <drivers/general/adi_drivers_general.h> 58 #define UART0_TX_PORTP0_MUX (1u<<20) 59 #define UART0_RX_PORTP0_MUX (1u<<22) 69 void common_Init(
void)
71 #ifdef REDIRECT_OUTPUT_TO_UART 73 *pREG_GPIO0_CFG |= UART0_TX_PORTP0_MUX | UART0_RX_PORTP0_MUX;
87 void common_Pass(
void)
89 char pass[] =
"All done!\n\r";
91 #ifdef REDIRECT_OUTPUT_TO_UART 109 void common_Fail(
char *FailureReason)
111 char fail[] =
"Failed: ";
112 char term[] =
"\n\r";
114 #ifdef REDIRECT_OUTPUT_TO_UART 118 adi_uart_Write(hDevOutput, FailureReason, strlen(FailureReason),
false, &pHwError);
122 printf(FailureReason);
136 void common_Perf(
char *InfoString)
138 char term[] =
"\n\r";
140 #ifdef REDIRECT_OUTPUT_TO_UART 143 adi_uart_Write(hDevOutput, InfoString, strlen(InfoString),
false, &pHwError);
ADI_UART_RESULT adi_uart_Write(ADI_UART_HANDLE const hDevice, void *const pBuffer, uint32_t const nBufSize, bool const bDMA, uint32_t *pHwError)
Submit the buffer for transmitting the data in ADI_UART_DATA_TRANSFER_MODE_BLOCKING. Call to this function will not return until the entire buffer is transmitted. Returns error if this function is called when device is operating in ADI_UART_DATA_TRANSFER_MODE_NONBLOCKING. i.e Function "adi_uart_SubmitTxBuffer()" is called and the transfer is not yet complete.
struct _ADI_UART_DEVICE * ADI_UART_HANDLE
ADI_UART_RESULT adi_uart_Open(uint32_t const nDeviceNum, ADI_UART_DIRECTION const eDirection, void *pMemory, uint32_t const nMemSize, ADI_UART_HANDLE *const phDevice)
Initialization function for the UART device.
#define ADI_UART_UNIDIR_MEMORY_SIZE