dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Common PIOS IAP Function header. More...

Files

file  pios_iap.h
 In application programming functions.
 

Macros

#define MAGIC_REG_1   BKP_DR1
 
#define MAGIC_REG_2   BKP_DR2
 
#define IAP_BOOTCOUNT   BKP_DR3
 
#define IAP_MAGIC_WORD_1   0x1122
 
#define IAP_MAGIC_WORD_2   0xAA55
 
#define IAP_MAGIC_WORD_3   0xBB11
 
#define UPPERWORD16(lw)   (uint16_t)((uint32_t)(lw)>>16)
 
#define LOWERWORD16(lw)   (uint16_t)((uint32_t)(lw)&0x0000ffff)
 
#define UPPERBYTE(w)   (uint8_t)((w)>>8)
 
#define LOWERBYTE(w)   (uint8_t)((w)&0x00ff)
 
#define IAP_MAGIC_WORD_1   0x1122
 
#define IAP_MAGIC_WORD_2   0xAA55
 
#define IAP_MAGIC_WORD_3   0xBB11
 
#define UPPERWORD16(lw)   (uint16_t)((uint32_t)(lw)>>16)
 
#define LOWERWORD16(lw)   (uint16_t)((uint32_t)(lw)&0x0000ffff)
 
#define UPPERBYTE(w)   (uint8_t)((w)>>8)
 
#define LOWERBYTE(w)   (uint8_t)((w)&0x00ff)
 
#define IAP_MAGIC_WORD_1   0x1122
 
#define IAP_MAGIC_WORD_2   0xAA55
 
#define IAP_MAGIC_WORD_3   0xBB11
 
#define UPPERWORD16(lw)   (uint16_t)((uint32_t)(lw)>>16)
 
#define LOWERWORD16(lw)   (uint16_t)((uint32_t)(lw)&0x0000ffff)
 
#define UPPERBYTE(w)   (uint8_t)((w)>>8)
 
#define LOWERBYTE(w)   (uint8_t)((w)&0x00ff)
 

Functions

void PIOS_IAP_Init (void)
 PIOS_IAP_Init - performs required initializations for iap module. More...
 
uint32_t PIOS_IAP_CheckRequest (void)
 Determines if an In-Application-Programming request has been made. More...
 
uint32_t PIOS_Boot_CheckRequest (void)
 Determines if a boot request has been made. More...
 
void PIOS_IAP_SetRequest1 (void)
 Sets the 1st word of the request sequence. More...
 
void PIOS_IAP_SetRequest2 (void)
 
void PIOS_IAP_SetRequest3 (void)
 
void PIOS_IAP_ClearRequest (void)
 
uint16_t PIOS_IAP_ReadBootCount (void)
 
void PIOS_IAP_WriteBootCount (uint16_t)
 

Detailed Description

Common PIOS IAP Function header.

STM32F4xx PIOS IAP Functions.

STM32F3xx PIOS IAP Functions.

STM32F1xx PIOS IAP Functions.

OSX SITL PIOS IAP Functions.

Macro Definition Documentation

#define IAP_BOOTCOUNT   BKP_DR3

Definition at line 49 of file pios_iap.h.

#define IAP_MAGIC_WORD_1   0x1122

Definition at line 41 of file pios_iap.c.

#define IAP_MAGIC_WORD_1   0x1122

Definition at line 41 of file pios_iap.c.

#define IAP_MAGIC_WORD_1   0x1122

Definition at line 41 of file pios_iap.c.

#define IAP_MAGIC_WORD_2   0xAA55

Definition at line 42 of file pios_iap.c.

#define IAP_MAGIC_WORD_2   0xAA55

Definition at line 42 of file pios_iap.c.

#define IAP_MAGIC_WORD_2   0xAA55

Definition at line 42 of file pios_iap.c.

#define IAP_MAGIC_WORD_3   0xBB11

Definition at line 43 of file pios_iap.c.

#define IAP_MAGIC_WORD_3   0xBB11

Definition at line 43 of file pios_iap.c.

#define IAP_MAGIC_WORD_3   0xBB11

Definition at line 43 of file pios_iap.c.

#define LOWERBYTE (   w)    (uint8_t)((w)&0x00ff)

Definition at line 48 of file pios_iap.c.

#define LOWERBYTE (   w)    (uint8_t)((w)&0x00ff)

Definition at line 48 of file pios_iap.c.

#define LOWERBYTE (   w)    (uint8_t)((w)&0x00ff)

Definition at line 48 of file pios_iap.c.

#define LOWERWORD16 (   lw)    (uint16_t)((uint32_t)(lw)&0x0000ffff)

Definition at line 46 of file pios_iap.c.

#define LOWERWORD16 (   lw)    (uint16_t)((uint32_t)(lw)&0x0000ffff)

Definition at line 46 of file pios_iap.c.

#define LOWERWORD16 (   lw)    (uint16_t)((uint32_t)(lw)&0x0000ffff)

Definition at line 46 of file pios_iap.c.

#define MAGIC_REG_1   BKP_DR1

Definition at line 47 of file pios_iap.h.

#define MAGIC_REG_2   BKP_DR2

Definition at line 48 of file pios_iap.h.

#define UPPERBYTE (   w)    (uint8_t)((w)>>8)

Definition at line 47 of file pios_iap.c.

#define UPPERBYTE (   w)    (uint8_t)((w)>>8)

Definition at line 47 of file pios_iap.c.

#define UPPERBYTE (   w)    (uint8_t)((w)>>8)

Definition at line 47 of file pios_iap.c.

#define UPPERWORD16 (   lw)    (uint16_t)((uint32_t)(lw)>>16)

Definition at line 45 of file pios_iap.c.

#define UPPERWORD16 (   lw)    (uint16_t)((uint32_t)(lw)>>16)

Definition at line 45 of file pios_iap.c.

#define UPPERWORD16 (   lw)    (uint16_t)((uint32_t)(lw)>>16)

Definition at line 45 of file pios_iap.c.

Function Documentation

uint32_t PIOS_Boot_CheckRequest ( void  )

Determines if a boot request has been made.

Determines if an In-Application-Programming request has been made.

Returns
true - if correct sequence found

Definition at line 63 of file pios_iap.c.

uint32_t PIOS_IAP_CheckRequest ( void  )

Determines if an In-Application-Programming request has been made.

Parameters
*comm- Which communication stream to use for the IAP (USB, Telemetry, I2C, SPI, etc)
Returns
TRUE - if correct sequence found, along with 'comm' updated. FALSE - Note that 'comm' will have an invalid comm identifier.
Return values
\returntrue - if correct sequence found

Definition at line 57 of file pios_iap.c.

void PIOS_IAP_ClearRequest ( void  )

Definition at line 89 of file pios_iap.c.

void PIOS_IAP_Init ( void  )

PIOS_IAP_Init - performs required initializations for iap module.

Returns
none.
Return values
none.
 Created: Sep 8, 2010 10:10:48 PM by joe

Definition at line 44 of file pios_iap.c.

uint16_t PIOS_IAP_ReadBootCount ( void  )

Definition at line 93 of file pios_iap.c.

void PIOS_IAP_SetRequest1 ( void  )

Sets the 1st word of the request sequence.

Parameters
n/a
Returns
n/a
Return values

Definition at line 74 of file pios_iap.c.

void PIOS_IAP_SetRequest2 ( void  )

Definition at line 79 of file pios_iap.c.

void PIOS_IAP_SetRequest3 ( void  )

Definition at line 84 of file pios_iap.c.

void PIOS_IAP_WriteBootCount ( uint16_t  boot_count)

Definition at line 98 of file pios_iap.c.