Classes | Macros | Typedefs | Functions
gr55xx_dfu.h File Reference

Device Firmware Update API. More...

`#include <stdbool.h>`
`#include <stdint.h>`

Go to the source code of this file.

## Classes
struct | dfu_receive_frame_t
| DFU frame information definition. More...
struct | dfu_boot_info_t
| Boot information definition. More...
struct | dfu_image_info_t
| Image information definition. More...
struct | dfu_func_t
| DFU used functions config definition. More...
struct | dfu_spi_flash_func_t
| SPI used functions config definition. More...
struct | dfu_pro_callback_t
| DFU program state callback definition. More...

## Macros
#define | DFU_FRAME_RECEIVE_MAX_LENGTH 2048
#define | DFU_IMG_INFO_PATTERN 0x4744
#define | DFU_WRITE_RAM_DISABLE 0x0001
#define | DFU_READ_RAM_DISABLE 0x0002
#define | DFU_DUMP_FLASH_DISABLE 0x0004
#define | DFU_ERASE_FLASH_DISABLE 0x0008
#define | DFU_UPDAE_FLASH_DISABLE 0x0010
#define | DFU_OPERATE_SYSTEM_INFO_DISABLE 0x0020
#define | DFU_OPERATE_NVDS_DISABLE 0x0040
#define | DFU_OPERATE_EFUSE_DISABLE 0x0080
#define | DFU_CONFIG_SPI_FLASH_DISABLE 0x0100
#define | DFU_OPERATE_REG_DISABLE 0x0200

## Typedefs
typedef void(* | dfu_receive_cmd_handler_t) (dfu_receive_frame_t *)
| DFU receive cmd handler type. More...

## Functions
void | dfu_init (dfu_func_t *p_app_dfu_func, uint8_t *p_dfu_buffer, dfu_pro_callback_t *p_dfu_callback)
| Function for initializing the DFU Used and Program State Callback. More...
void | dfu_cmd_parse_state_reset (void)
| Function for reset the DFU cmd parse state. More...
void | dfu_ble_set_mtu_size (uint16_t mtu_size)
| Function for setting the BLE MTU size. More...
void | dfu_ble_send_data_cmpl_process (void)
| This function should be called when BLE stack sends data completely. More...
void | dfu_ble_receive_data_process (uint8_t *p_data, uint16_t length)
| This function should be called when BLE receives data. More...
void | dfu_uart_receive_data_process (uint8_t *p_data, uint16_t length)
| This function should be called when UART receives data. More...
void | dfu_schedule (void)
| Function for checking DFU cmd. More...
void | dfu_set_disable_cmd (uint16_t disable_cmd_bit_map)
| Function for set DFU disable cmd. More...
void | dfu_set_cmd_handler (uint8_t index, uint16_t cmd, dfu_receive_cmd_handler_t cmd_handler)
| Function for set DFU cmd handler. More...
void | dfu_spi_flash_func_config (dfu_spi_flash_func_t *spi_flash_func)
| Function for initializing the DFU SPI Flash Callback. More...

## Detailed Description

Device Firmware Update API.

Attention
  #####Copyright (c) 2019 GOODIX All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file gr55xx_dfu.h.