uartlite experiments

This commit is contained in:
paul nehlich
2024-10-09 13:40:01 +02:00
parent 1d438f46ba
commit 1392b6ba4d
8 changed files with 60 additions and 4 deletions

View File

@ -414,12 +414,21 @@
/******************************************************************/
/* Canonical definitions for peripheral UARTLITE */
#define XUARTLITE_BASEADDRESS 0x42c00000
#define XPAR_UARTLITE_0_DEVICE_ID 111
#define XPAR_XUARTLITE_NUM_INSTANCES 1 /* Number of instances */
#define XPAR_UARTLITE_0_DEVICE_ID 30 /* Device ID for instance */
#define XPAR_UARTLITE_0_BASEADDR 0xA0020000 /* Device base address */
#define XPAR_UARTLITE_0_BAUDRATE 19200 /* Baud rate */
#define XPAR_UARTLITE_0_USE_PARITY FALSE /* Parity generator enabled */
#define XPAR_UARTLITE_0_ODD_PARITY FALSE /* Type of parity generated */
#define XPAR_UARTLITE_0_DATA_BITS 8 /* Data bits */
/* Definitions for driver UARTPS */
#define XPAR_XUARTPS_NUM_INSTANCES 1
/* Definitions for peripheral PS7_UART_1 */
#define XPAR_PS7_UART_1_DEVICE_ID 0
#define XPAR_PS7_UART_1_BASEADDR 0xE0001000

View File

@ -10,5 +10,6 @@ add_subdirectory(libsrc/scugic)
add_subdirectory(libsrc/scutimer)
add_subdirectory(libsrc/scuwdt)
add_subdirectory(libsrc/standalone)
add_subdirectory(libsrc/uartlite)

View File

@ -0,0 +1,9 @@
target_sources(${TARGET_NAME} PUBLIC
src/xuartlite_g.c
src/xuartlite_intr.c
src/xuartlite_l.c
src/xuartlite_selftest.c
src/xuartlite_sinit.c
src/xuartlite_stats.c
src/xuartlite.c
)

View File

@ -29,8 +29,16 @@
/***************************** Include Files *********************************/
#include "xuartlite.h"
#include "xparameters.h"
//#include "xparameters.h" // TODO: Why does this include not work?!
#define XPAR_XUARTLITE_NUM_INSTANCES 1 /* Number of instances */
#define XPAR_UARTLITE_0_DEVICE_ID 30 /* Device ID for instance */
#define XPAR_UARTLITE_0_BASEADDR 0xA0020000 /* Device base address */
#define XPAR_UARTLITE_0_BAUDRATE 19200 /* Baud rate */
#define XPAR_UARTLITE_0_USE_PARITY FALSE /* Parity generator enabled */
#define XPAR_UARTLITE_0_ODD_PARITY FALSE /* Type of parity generated */
#define XPAR_UARTLITE_0_DATA_BITS 8 /* Data bits */
/************************** Constant Definitions *****************************/

View File

@ -59,6 +59,17 @@
* @note None.
*
******************************************************************************/
#define XPAR_XUARTLITE_NUM_INSTANCES 1 /* Number of instances */
#define XUARTLITE_BASEADDRESS 0x42c00000
#define XPAR_UARTLITE_0_BAUDRATE 1115200
#define XPAR_UARTLITE_0_BASEADDRESS 0x42c00000 /* TODO: Why are there two Base address variables?*/
#define XPAR_UARTLITE_0_DEVICE_ID 1113
#define XPAR_UARTLITE_0_USE_PARITY 1 /* TODO: What does this mean?*/
#define XPAR_UARTLITE_0_ODD_PARITY 0 /* TODO: What does this mean?*/
#define XPAR_UARTLITE_0_DATA_BITS 8 // EIGHT is always a good guess...
#ifndef SDT
XUartLite_Config *XUartLite_LookupConfig(u16 DeviceId)
{