rusEFI
The most advanced open source ECU
|
Typedefs | |
typedef struct t_shared_params_buffer | tSharedParamsBuffer |
Layout of the shared parameters RAM buffer. | |
Functions | |
static tSharedParamsBuffer sharedParamsBuffer | __attribute__ ((section(".shared"))) |
static bool | SharedParamsValidateBuffer (void) |
Validates the shared parameter buffer contents by looking at the table identifier and verifying its checksum. | |
static void | SharedParamsWriteChecksum (void) |
Calculates and writes the checksum into the buffer. | |
static bool | SharedParamsVerifyChecksum (void) |
Calculates and verifies the checksum that is currently present in the buffer. | |
static uint16_t | SharedParamsCalculateChecksum (void) |
Calculates and returns the checksum value for the current contents in the buffer. The checksum is calculated by taking the sum of all bytes in the parameter buffer (excluding the checksum at the end) and them taking the two's complement value of it. | |
void | SharedParamsInit (void) |
Initializes the shared RAM parameters module. | |
bool | SharedParamsReadByIndex (uint32_t idx, uint8_t *value) |
Reads a data byte from the shared parameter buffer at the specified index. | |
bool | SharedParamsWriteByIndex (uint32_t idx, uint8_t value) |
Writes a data byte to the shared parameter buffer at the specified index. | |
typedef struct t_shared_params_buffer tSharedParamsBuffer |
Layout of the shared parameters RAM buffer.
|
static |
|
static |
Calculates and returns the checksum value for the current contents in the buffer. The checksum is calculated by taking the sum of all bytes in the parameter buffer (excluding the checksum at the end) and them taking the two's complement value of it.
Definition at line 232 of file shared_params.c.
Referenced by SharedParamsVerifyChecksum(), and SharedParamsWriteChecksum().
void SharedParamsInit | ( | void | ) |
Initializes the shared RAM parameters module.
Definition at line 83 of file shared_params.c.
Referenced by jump_to_openblt(), and main().
bool SharedParamsReadByIndex | ( | uint32_t | idx, |
uint8_t * | value | ||
) |
Reads a data byte from the shared parameter buffer at the specified index.
idx | Index into the parameter data array. A valid value is between 0 and (SHARED_PARAMS_CFG_BUFFER_DATA_LEN - 1). |
value | Pointer to where the read data value is stored. |
Definition at line 119 of file shared_params.c.
Referenced by checkIfRebootIntoOpenBltRequested(), and checkIfResetLoop().
|
static |
Validates the shared parameter buffer contents by looking at the table identifier and verifying its checksum.
Definition at line 175 of file shared_params.c.
Referenced by SharedParamsInit(), SharedParamsReadByIndex(), and SharedParamsWriteByIndex().
|
static |
Calculates and verifies the checksum that is currently present in the buffer.
Definition at line 209 of file shared_params.c.
Referenced by SharedParamsValidateBuffer().
bool SharedParamsWriteByIndex | ( | uint32_t | idx, |
uint8_t | value | ||
) |
Writes a data byte to the shared parameter buffer at the specified index.
idx | Index into the parameter data array. A valid value is between 0 and (SHARED_PARAMS_CFG_BUFFER_DATA_LEN - 1). |
value | Value to write. |
Definition at line 145 of file shared_params.c.
Referenced by checkIfRebootIntoOpenBltRequested(), checkIfResetLoop(), jump_to_openblt(), and tryResetWatchdog().
|
static |
Calculates and writes the checksum into the buffer.
Definition at line 196 of file shared_params.c.
Referenced by SharedParamsInit(), and SharedParamsWriteByIndex().