![]() |
Contains functions definitions which are relevant for interface between lower and upper layers of PDCP. More...
Functions | ||||
SPI_INIT_STATUS | initSpi () | |||
SPI Interface Initialization. | ||||
uint8_t | transmitSpi (uint8_t data) | |||
SPI Transmit Data. | ||||
CAN_INIT_STATUS | initCan (uint8_t id) | |||
Can initialization. | ||||
void | hal_set_filter (uint8_t id) | |||
Function to set filters of node indicated by ID. | ||||
void | hal_set_mask (uint8_t id) | |||
Function to set mask of node indicated by ID. | ||||
void | initEEPROM (void) | |||
Init EEPROM. | ||||
uint8_t | readEEPROM (uint8_t address) | |||
Read EEPROM. | ||||
void | writeEEPROM (uint8_t address, uint8_t data) | |||
Write EEPROM. | ||||
void | initInterrupts (void) | |||
Initialize all needed interrupts (TIMERS, EXTx..) | ||||
void | initIOPort (void) | |||
Place for I/O pins initialization. | ||||
void | initIOPort_appDesigner (void) | |||
Place for I/O pins initialization left for application designer. | ||||
void | initInterrupts_appDesigner (void) | |||
Place for interrupt initialization left for application designer. | ||||
void | initSPIPorts (void) | |||
Spi ports initialization. | ||||
uint8_t | mcp2515TransmitData (uint8_t mode, uint8_t reg, uint8_t val, uint8_t setClearFlag) | |||
Function to transmit data between MCU and MCP2515. | ||||
void | initINTPorts (void) | |||
Software interrupt ports initialization. | ||||
void | triggerSoftwareInterrupt (uint8_t port) | |||
Function to trigger software interrupt. | ||||
void | checkTransmissionErrors (struct errorStr *readErrStr) | |||
Callback function to check whether errors in transmission have occured. | ||||
void | clearTransmissionErrors (void) | |||
Function to clear error structure. | ||||
void | forceReset (void) | |||
Function to call reset handler. | ||||
void | initLowLevelProtocolHardware (void) | |||
Function to initialize all important ports and methods for LLP hardware. | ||||
void | initUSART (uint16_t baud) | |||
Function to initialize all important ports and methods for LLP hardware. | ||||
void | printCharUsart (char sign) | |||
Function to send single char through UART. | ||||
void | printUsart (char *str) | |||
Function to send string of chars through UART. | ||||
void | hal_msg_take () | |||
Function to trigger message sending. | ||||
void | wdtDisable () | |||
Function to disable watchdog timer. | ||||
wdtEnable | ||||
Function to enable watchdog timer
| ||||
void | wdtEnable (uint8_t time) |
Contains functions definitions which are relevant for interface between lower and upper layers of PDCP.
void checkTransmissionErrors | ( | struct errorStr * | readErrStr | ) |
Callback function to check whether errors in transmission have occured.
[in] | struct | errorStr* Pointer to structure (type of errorStr) to read errors |
void clearTransmissionErrors | ( | void | ) |
Function to clear error structure.
[in] | void |
void forceReset | ( | void | ) |
Function to call reset handler.
[in] | void |
void hal_msg_take | ( | void | ) |
Function to trigger message sending.
void hal_set_filter | ( | uint8_t | id | ) |
Function to set filters of node indicated by ID.
Can be called after PIN initialization
[in] | id | CONFIG_BUS_MODE |
void hal_set_mask | ( | uint8_t | id | ) |
Function to set mask of node indicated by ID.
Can be called after PIN initialization
[in] | id | CONFIG_BUS_MODE |
CAN_INIT_STATUS initCan | ( | uint8_t | id | ) |
Can initialization.
Can be called after PIN initialization
[in] | id | Id CONFIG_BUS_MODE |
[in] | moduleMode | CONFIG_BUS_MODE type |
void initEEPROM | ( | void | ) |
Init EEPROM.
void initInterrupts | ( | void | ) |
Initialize all needed interrupts (TIMERS, EXTx..)
Contains call to function initInterrupts_appDesigner() which should contain
initialization of interrupts indispensible for application (empty by default)
[in] | void |
void initInterrupts_appDesigner | ( | void | ) |
Place for interrupt initialization left for application designer.
[in] | void |
void initINTPorts | ( | void | ) |
Software interrupt ports initialization.
[in] | void |
void initIOPort | ( | void | ) |
Place for I/O pins initialization.
Contains call to function initIOPort_appDesigner() which should contain
initialization of IO Ports indispensible for application (empty by default)
[in] | void |
void initIOPort_appDesigner | ( | void | ) |
Place for I/O pins initialization left for application designer.
Can consist of I2C, pins, interfaces etc. initialization
[in] | void |
void initLowLevelProtocolHardware | ( | void | ) |
Function to initialize all important ports and methods for LLP hardware.
[in] | void |
SPI_INIT_STATUS initSpi | ( | void | ) |
SPI Interface Initialization.
Port initialization done in InitPorts function
void initSPIPorts | ( | void | ) |
Spi ports initialization.
[in] | void |
look at uCmaskFile.h where ports are defined
void initUSART | ( | uint16_t | baud | ) |
Function to initialize all important ports and methods for LLP hardware.
[in] | baud | Baudrate |
uint8_t mcp2515TransmitData | ( | uint8_t | mode, |
uint8_t | reg, | ||
uint8_t | val, | ||
uint8_t | setClearFlag | ||
) |
Function to transmit data between MCU and MCP2515.
Can be called after PIN initialization
[in] | mode | Mode of operation MCP_WRITE_CMD, MCP_READ_CMD or MPC_BIT_MODIFY |
[in] | reg | Address of register to change/read |
[in] | val | Value to to change: must be a shift value if MPC_BIT_MODIFY is specified, otherwise full value register |
[in] | setClearFlag | If MPC_BIT_MODIFY specified, SET_BIT or CLR_BIT (defined in MCP2515_CAN_control.h file) defines clearing of setting mode |
void printCharUsart | ( | char | sign | ) |
Function to send single char through UART.
[in] | sign | Sign to send through USART |
void printUsart | ( | char * | str | ) |
Function to send string of chars through UART.
[in] | str | String to send through UART |
uint8_t readEEPROM | ( | uint8_t | address | ) |
Read EEPROM.
[in] | address | EEPROM read address |
uint8_t transmitSpi | ( | uint8_t | data | ) |
SPI Transmit Data.
May be called after PIN initialization
[in] | data | Data to transmission |
void triggerSoftwareInterrupt | ( | uint8_t | port | ) |
Function to trigger software interrupt.
[in] | void |
void wdtDisable | ( | void | ) |
Function to disable watchdog timer.
void writeEEPROM | ( | uint8_t | address, |
uint8_t | data | ||
) |
Write EEPROM.
[in] | address | EEPROM write address |
[in] | data | EEPROM write data |