Atmel Software Framework

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages

Class internal implementation.

Functions

static void udi_dfu_atmel_mem_check (void)
 Process a blank check on memory. More...
 
static bool udi_dfu_atmel_mem_getaddr (uint8_t *arg)
 Gets a memory address in a Atmel DFU command. More...
 
static bool udi_dfu_atmel_mem_protected (void)
 Change DFU status to notify that the memory is protected. More...
 
static bool udi_dfu_atmel_mem_read (void)
 Reads memory and transfer data to USB interface. More...
 
static bool udi_dfu_atmel_mem_send_last_add (void)
 Send address which has failed during check memory. More...
 
static bool udi_dfu_atmel_mem_write (void)
 Writes memory with data from USB interface. More...
 
static void udi_dfu_atmel_sel_mem (uint8_t mem_num)
 Selects the memory. More...
 

Internal routines to manage DFU requests

static void udi_dfu_atmel_reset_protocol (void)
 Resets DFU status and usb setup process callbacks. More...
 
static bool udi_dfu_flip_msg_decode (void)
 Decodes the Atmel DFU Command Called by over_under_run callback when the first data packet from a DNLOAD DFU request is received. More...
 

Manages Atmel DFU command from protocol version 2

static bool udi_dfu_atmel_program (void)
 Decodes and prepares program memory command. More...
 
static bool udi_dfu_atmel_read (void)
 Decodes and prepares read memory command. More...
 
static bool udi_dfu_atmel_blankcheck (void)
 Decodes and process blank check memory command. More...
 
static bool udi_dfu_atmel_erase_chip (void)
 Decodes and process erase chip command. More...
 
static void udi_dfu_atmel_start (void)
 Decodes and prepares CPU reset command. More...
 
static bool udi_dfu_atmel_select_memory (void)
 Decodes and process memory select command. More...
 

static bool udi_dfu_atmel_blankcheck ( void  )
static

Decodes and process blank check memory command.

Returns
1 if command was accepted, otherwise 0.

References dfu_status_t::bState, dfu_status_t::bStatus, DFU_STATE_DFUERROR, DFU_STATUS_ERRWRITE, isp_mem_t::fnct_read, udi_dfu_atmel_mem_check(), udi_dfu_atmel_mem_getaddr(), and udi_dfu_flip_msg.

Referenced by udi_dfu_flip_msg_decode().

static bool udi_dfu_atmel_erase_chip ( void  )
static
static bool udi_dfu_atmel_mem_getaddr ( uint8_t *  arg)
static

Gets a memory address in a Atmel DFU command.

Parameters
argpointer to read address
Returns
1 if command was accepted, otherwise 0.

References Assert, dfu_status_t::bState, dfu_status_t::bStatus, DFU_STATE_DFUERROR, DFU_STATUS_ERRADDRESS, isp_mem_t::size, udi_dfu_atmel_mem_add, and udi_dfu_atmel_mem_nb_data.

Referenced by udi_dfu_atmel_blankcheck(), udi_dfu_atmel_program(), and udi_dfu_atmel_read().

static bool udi_dfu_atmel_mem_protected ( void  )
static

Change DFU status to notify that the memory is protected.

Returns
1 if command was accepted, otherwise 0.

References dfu_status_t::bState, dfu_status_t::bStatus, DFU_STATE_DFUIDLE, and DFU_STATUS_ERRWRITE.

Referenced by udi_dfu_atmel_program(), and udi_dfu_atmel_read().

static bool udi_dfu_atmel_mem_read ( void  )
static

Reads memory and transfer data to USB interface.

Returns
1 if command was accepted, otherwise 0.

References Assert, DFU_ATMEL_BUF_TRANS_SIZE, isp_mem_t::fnct_read, udd_set_setup_payload(), udi_dfu_atmel_buf_trans, udi_dfu_atmel_mem_add, and udi_dfu_atmel_mem_nb_data.

Referenced by udi_dfu_atmel_read().

static bool udi_dfu_atmel_mem_send_last_add ( void  )
static

Send address which has failed during check memory.

Returns
1 if command was accepted, otherwise 0.

References udd_set_setup_payload(), udi_dfu_atmel_buf_trans, and udi_dfu_atmel_mem_add.

Referenced by udi_dfu_atmel_mem_check().

static bool udi_dfu_atmel_mem_write ( void  )
static
static void udi_dfu_atmel_reset_protocol ( void  )
static
static void udi_dfu_atmel_sel_mem ( uint8_t  mem_num)
static
static bool udi_dfu_atmel_select_memory ( void  )
static
static void udi_dfu_atmel_start ( void  )
static
static bool udi_dfu_flip_msg_decode ( void  )
static