rusEFI
The most advanced open source ECU
|
Functions | |
__attribute__ ((weak)) | |
Initializes the backdoor entry option. | |
blt_bool | BackDoorEntryHook (void) |
Checks if a backdoor entry is requested. | |
blt_bool | CpuUserProgramStartHook (void) |
Callback that gets called when the bootloader is about to exit and hand over control to the user program. This is the last moment that some final checking can be performed and if necessary prevent the bootloader from activiting the user program. | |
void | UsbConnectHook (blt_bool connect) |
Callback that gets called whenever the USB device should be connected to the USB bus. | |
void | UsbEnterLowPowerModeHook (void) |
Callback that gets called whenever the USB host requests the device to enter a low power mode. | |
void | UsbLeaveLowPowerModeHook (void) |
Callback that gets called whenever the USB host requests the device to exit low power mode. | |
void | NvmInitHook (void) |
Callback that gets called at the start of the internal NVM driver initialization routine. | |
void | NvmReinitHook (void) |
Callback that gets called at the start of a firmware update to reinitialize the NVM driver. | |
blt_int8u | NvmWriteHook (blt_addr addr, blt_int32u len, blt_int8u *data) |
Callback that gets called at the start of the NVM driver write routine. It allows additional memory to be operated on. If the address is not within the range of the additional memory, then BLT_NVM_NOT_IN_RANGE must be returned to indicate that the data hasn't been written yet. | |
blt_int8u | NvmEraseHook (blt_addr addr, blt_int32u len) |
Callback that gets called at the start of the NVM driver erase routine. It allows additional memory to be operated on. If the address is not within the range of the additional memory, then BLT_NVM_NOT_IN_RANGE must be returned to indicate that the memory hasn't been erased yet. | |
blt_bool | NvmDoneHook (void) |
Callback that gets called at the end of the NVM programming session. | |
blt_bool | NvmVerifyChecksumHook (void) |
Verifies the checksum, which indicates that a valid user program is present and can be started. | |
blt_bool | NvmWriteChecksumHook (void) |
Writes a checksum of the user program to non-volatile memory. This is performed once the entire user program has been programmed. Through the checksum, the bootloader can check if a valid user programming is present and can be started. | |
blt_int8u | XcpGetSeedHook (blt_int8u resource, blt_int8u *seed) |
Provides a seed to the XCP master that will be used for the key generation when the master attempts to unlock the specified resource. Called by the GET_SEED command. | |
blt_int8u | XcpVerifyKeyHook (blt_int8u resource, blt_int8u *key, blt_int8u len) |
Called by the UNLOCK command and checks if the key to unlock the specified resource was correct. If so, then the resource protection will be removed. | |
__attribute__ | ( | (weak) | ) |
blt_bool BackDoorEntryHook | ( | void | ) |
blt_bool CpuUserProgramStartHook | ( | void | ) |
Callback that gets called when the bootloader is about to exit and hand over control to the user program. This is the last moment that some final checking can be performed and if necessary prevent the bootloader from activiting the user program.
Definition at line 86 of file hooks.c.
Referenced by CpuStartUserProgram().
blt_bool NvmDoneHook | ( | void | ) |
blt_int8u NvmEraseHook | ( | blt_addr | addr, |
blt_int32u | len | ||
) |
Callback that gets called at the start of the NVM driver erase routine. It allows additional memory to be operated on. If the address is not within the range of the additional memory, then BLT_NVM_NOT_IN_RANGE must be returned to indicate that the memory hasn't been erased yet.
addr | Start address. |
len | Length in bytes. |
Definition at line 223 of file hooks.c.
void NvmInitHook | ( | void | ) |
void NvmReinitHook | ( | void | ) |
blt_bool NvmVerifyChecksumHook | ( | void | ) |
blt_bool NvmWriteChecksumHook | ( | void | ) |
Writes a checksum of the user program to non-volatile memory. This is performed once the entire user program has been programmed. Through the checksum, the bootloader can check if a valid user programming is present and can be started.
Definition at line 262 of file hooks.c.
blt_int8u NvmWriteHook | ( | blt_addr | addr, |
blt_int32u | len, | ||
blt_int8u * | data | ||
) |
Callback that gets called at the start of the NVM driver write routine. It allows additional memory to be operated on. If the address is not within the range of the additional memory, then BLT_NVM_NOT_IN_RANGE must be returned to indicate that the data hasn't been written yet.
addr | Start address. |
len | Length in bytes. |
data | Pointer to the data buffer. |
Definition at line 204 of file hooks.c.
void UsbConnectHook | ( | blt_bool | connect | ) |
Callback that gets called whenever the USB device should be connected to the USB bus.
connect | BLT_TRUE to connect and BLT_FALSE to disconnect. |
Definition at line 132 of file hooks.c.
Referenced by PCD_ConnectCallback(), and PCD_DisconnectCallback().
void UsbEnterLowPowerModeHook | ( | void | ) |
Callback that gets called whenever the USB host requests the device to enter a low power mode.
Definition at line 144 of file hooks.c.
Referenced by PCD_SuspendCallback().
void UsbLeaveLowPowerModeHook | ( | void | ) |
Callback that gets called whenever the USB host requests the device to exit low power mode.
Definition at line 156 of file hooks.c.
Referenced by PCD_ResumeCallback().
Provides a seed to the XCP master that will be used for the key generation when the master attempts to unlock the specified resource. Called by the GET_SEED command.
resource | Resource that the seed if requested for (XCP_RES_XXX). |
seed | Pointer to byte buffer wher the seed will be stored. |
Definition at line 283 of file hooks.c.
Called by the UNLOCK command and checks if the key to unlock the specified resource was correct. If so, then the resource protection will be removed.
resource | resource to unlock (XCP_RES_XXX). |
key | pointer to the byte buffer holding the key. |
len | length of the key in bytes. |
Definition at line 306 of file hooks.c.