123
Fork of LG by
DeviceController.h
- Committer:
- Diletant
- Date:
- 2016-05-15
- Revision:
- 161:efd949e8d536
- Parent:
- 156:e68ee0bcdcda
- Child:
- 167:bedc0a9d559a
File content as of revision 161:efd949e8d536:
#ifndef __DEVICE_CONTROLLER_H__ #define __DEVICE_CONTROLLER_H__ #include "DeviceFlash.h" #include "DeviceSSP.h" #include "DeviceI2C.h" #include "DeviceQEI.h" #include "DeviceServicePort.h" #include "DeviceUserPort.h" //#include "DeviceDAC.h" #include "DeviceTimers.h" typedef struct _DeviceUARTSettings { uint32_t baudRate; } DeviceUARTSettings; typedef struct _DeviceUARTState { //Line Control Register. Contains controls for frame formatting and break generation. uint8_t LCR; //Divisor Latch MSB. Most significant byte of the baud rate divisor value. //The full divisor is used to generate a baud rate from the fractional rate divider. //When DLAB = 1 uint8_t DLM; //Divisor Latch LSB. Least significant byte of the baud rate divisor value. //The full divisor is used to generate a baud rate from the fractional rate divider. //When DLAB = 1 uint8_t DLL; //FIFO Control Register. Controls FIFO usage and modes. uint8_t FCR; } DeviceUARTState; typedef struct _DeviceUART { DeviceUARTSettings settings; DeviceUARTState state; } DeviceUART; typedef struct _DeviceController { uint32_t chip; DeviceFlash flash; //DeviceDAC dac; DeviceSSP SSP; DeviceI2C I2C; DeviceQEI QEI; DeviceTimer timer[2]; DeviceUART uart[2]; } DeviceController; void InitControllerWithDefaults(void); void InitController(void); #endif /* __DEVICE_CONTROLLER_H__ */