BlueToe
an alternative GATT/BLE implementation
|
Prototype for a handler, that adapts the bootloader service to the actual hardware. More...
#include <bluetoe/services/bootloader.hpp>
Public Member Functions | |
bootloader::error_codes | start_flash (std::uintptr_t address, const std::uint8_t *values, std::size_t size) |
bootloader::error_codes | run (std::uintptr_t start_addr) |
bootloader::error_codes | reset () |
std::pair< const std::uint8_t *, std::size_t > | get_version () |
void | read_mem (std::uintptr_t address, std::size_t size, std::uint8_t *destination) |
std::uint32_t | checksum32 (std::uintptr_t start_addr, std::size_t size) |
std::uint32_t | checksum32 (const std::uint8_t *start_addr, std::size_t size, std::uint32_t old_crc) |
std::uint32_t | checksum32 (std::uintptr_t start_addr) |
bootloader::error_codes | public_read_mem (std::uintptr_t address, std::size_t size, std::uint8_t *destination) |
std::uint32_t | public_checksum32 (std::uintptr_t start_addr, std::size_t size) |
version of checksum function, that will be directly called by the execution of the Get CRC procedure. | |
void | control_point_notification_call_back () |
technical required function, that have to call bootloader_control_point_notification(), with the instance of the server | |
void | data_indication_call_back () |
technical required function, that have to call bootloader_data_indication(), with the instance of the server | |
Prototype for a handler, that adapts the bootloader service to the actual hardware.
std::uint32_t bluetoe::bootloader::bootloader_handler_prototype::checksum32 | ( | const std::uint8_t * | start_addr, |
std::size_t | size, | ||
std::uint32_t | old_crc | ||
) |
adds new data to the given crc
std::uint32_t bluetoe::bootloader::bootloader_handler_prototype::checksum32 | ( | std::uintptr_t | start_addr | ) |
special overload to calculate the CRC over a start address
std::uint32_t bluetoe::bootloader::bootloader_handler_prototype::checksum32 | ( | std::uintptr_t | start_addr, |
std::size_t | size | ||
) |
calculate the checksum of the given range of memory.
std::pair< const std::uint8_t *, std::size_t > bluetoe::bootloader::bootloader_handler_prototype::get_version | ( | ) |
Return a custom string as response to the Get Version procedure. Make sure, that the response is not longer than 20 bytes, or othere wise it could get truncated on the link layer.
std::uint32_t bluetoe::bootloader::bootloader_handler_prototype::public_checksum32 | ( | std::uintptr_t | start_addr, |
std::size_t | size | ||
) |
version of checksum function, that will be directly called by the execution of the Get CRC procedure.
bootloader::error_codes bluetoe::bootloader::bootloader_handler_prototype::public_read_mem | ( | std::uintptr_t | address, |
std::size_t | size, | ||
std::uint8_t * | destination | ||
) |
This function is used, when reading from memory, while the Read procedure is executed.
void bluetoe::bootloader::bootloader_handler_prototype::read_mem | ( | std::uintptr_t | address, |
std::size_t | size, | ||
std::uint8_t * | destination | ||
) |
this is very handy, when it comes to testing...
bootloader::error_codes bluetoe::bootloader::bootloader_handler_prototype::reset | ( | ) |
reset bootloader
bootloader::error_codes bluetoe::bootloader::bootloader_handler_prototype::run | ( | std::uintptr_t | start_addr | ) |
Run the program given at start_addr
bootloader::error_codes bluetoe::bootloader::bootloader_handler_prototype::start_flash | ( | std::uintptr_t | address, |
const std::uint8_t * | values, | ||
std::size_t | size | ||
) |
Start to flash
When the hardware signals, that the memory is flashed, end_flash( server) have to be called on the server instance