46 #include <px4_platform_common/px4_config.h> 47 #include <board_config.h> 58 int val_read(
void *dest,
volatile const void *src,
int bytes)
63 for (i = 0; i < bytes / 4; i++) {
64 *(((
volatile unsigned *)dest) + i) = *(((
volatile unsigned *)src) + i);
71 int write_otp(uint8_t id_type, uint32_t vid, uint32_t pid,
char *signature)
74 warnx(
"write_otp: PX4 / %02X / %02lX / %02lX / ... etc \n", id_type, (
unsigned long)vid, (
unsigned long)pid);
112 for (
int i = 0 ; i < 128 ; i++) {
139 for (
int i = 0 ; i < locksize ; i++) {
190 unsigned char octet[4] = {0, 0, 0, 0};
194 for (
int i = 0; i < 4; i++) {
195 octet[i] = (Data >> (i * 8)) & 0xFF;
223 *(
volatile uint8_t *)Address = Data;
static struct vehicle_status_s status
#define ADDR_OTP_LOCK_START
int val_read(void *dest, volatile const void *src, int bytes)
int F_write_word(unsigned long Address, uint32_t Data)
#define IS_F_ADDRESS(ADDRESS)
int write_otp(uint8_t id_type, uint32_t vid, uint32_t pid, char *signature)
Definition of commonly used conversions.
Simple error/warning functions, heavily inspired by the BSD functions of the same names...
static int F_GetStatus(void)
#define F_ERROR_OPERATION
int F_write_byte(unsigned long Address, uint8_t Data)
One TIme Programmable ( OTP ) Flash routine/s.