DFU API definitions.
Copyright (c) 2018 Microchip Technology Inc. and its subsidiaries.
#include "platform_files.h"
#include "stdlib.h"
#include "string.h"
#include "bm_mode.h"
#include "bm_program_mode.h"
#include "bm_application_mode.h"
#include "bm_utils.h"
#include "event_mem.h"
#include "ble_api.h"
#include "dfu_api.h"
#include "interface.h"
Functions | |
dfu_status_t | dfu_deinit (platform_init_t *platform_init) |
dfu_status_t | dfu_init (platform_init_t *platform_init) |
dfu_status_t | dfu_program_memory_erase (uint32_t address, uint8_t length) |
dfu_status_t | dfu_program_memory_read (uint32_t address, uint8_t *data, uint8_t length) |
dfu_status_t | dfu_program_memory_write (uint32_t address, uint8_t *data, uint8_t length, bool write_continue) |
dfu_status_t | dfu_program_memory_write_continue (uint32_t address, uint8_t *data, uint8_t length, uint8_t continue_mode, uint32_t continue_length) |
bool | dfu_response_check (uint8_t byte) |
static uint8_t * | dfu_response_read_parser (BM_PROGRAM_HCI_EVENT_STATUS status_id) |
static dfu_status_t | dfu_response_report_parser (BM_PROGRAM_HCI_EVENT_STATUS status_id) |
static uint16_t | dfu_status_handle_parser (BM_PROGRAM_HCI_EVENT_STATUS status_id) |
static dfu_status_t | dfu_status_report_parser (BM_PROGRAM_HCI_EVENT_STATUS status_id) |
Variables | |
BM_PROGRAM_CMDPKT * | program_cmdpkt = NULL |
static uint16_t | program_handle |
dfu_status_t dfu_deinit | ( | platform_init_t * | platform_init | ) |
dfu_status_t dfu_init | ( | platform_init_t * | platform_init | ) |
References BM_MODE_PROGRAM, BM_PROGRAM_Connect(), BM_PROGRAM_HCI_SUCCESS, BM_PROGRAM_Init(), dfu_status_handle_parser(), dfu_status_report_parser(), DFU_SUCCESS, EVENT_PKT_TYPE, interface_cmd_send_wait(), interface_event_wait(), interface_init(), ble_platform_api_list_t::mode_set, platform_init_t::platform_api_list, and program_handle.
dfu_status_t dfu_program_memory_erase | ( | uint32_t | address, |
uint8_t | length | ||
) |
dfu_status_t dfu_program_memory_read | ( | uint32_t | address, |
uint8_t * | data, | ||
uint8_t | length | ||
) |
References BM_PROGRAM_HCI_HANDLE, BM_PROGRAM_HCI_SUCCESS, BM_PROGRAM_Read(), data, DATA_ACL_PKT_TYPE, dfu_response_read_parser(), dfu_response_report_parser(), dfu_status_report_parser(), DFU_SUCCESS, EVENT_PKT_TYPE, interface_cmd_send_wait(), interface_event_wait(), length, NULL, and program_handle.
dfu_status_t dfu_program_memory_write | ( | uint32_t | address, |
uint8_t * | data, | ||
uint8_t | length, | ||
bool | write_continue | ||
) |
dfu_status_t dfu_program_memory_write_continue | ( | uint32_t | address, |
uint8_t * | data, | ||
uint8_t | length, | ||
uint8_t | continue_mode, | ||
uint32_t | continue_length | ||
) |
References BM_PROGRAM_HCI_HANDLE, BM_PROGRAM_HCI_SUCCESS, BM_PROGRAM_Write(), BM_PROGRAM_Write_Continue(), data, DATA_ACL_PKT_TYPE, dfu_response_report_parser(), dfu_status_report_parser(), DFU_SUCCESS, DFU_WRITE_CONTINUE_PROCEED, DFU_WRITE_CONTINUE_START, DFU_WRITE_CONTINUE_STOP, EVENT_PKT_TYPE, interface_cmd_send_wait(), interface_event_wait(), length, and program_handle.
bool dfu_response_check | ( | uint8_t | byte | ) |
References BM_PROGRAM_ResponseCheck().
Referenced by interface_process_fifo_data().
|
static |
References BM_PGM_HCI_ACL_VAL, event_msg_t::data, PACKED::data, event_t::event_id, event_t::event_msg, get_received_cmd_frame(), NULL, and PACKED::status.
Referenced by dfu_program_memory_read().
|
static |
References BM_PGM_HCI_ACL_VAL, BM_PGM_HCI_EVENT_VAL, BM_PROGRAM_HCI_CONN, BM_PROGRAM_HCI_DISCONN, event_msg_t::data, DFU_FAIL, DFU_SUCCESS, PACKED::event, event_t::event_id, event_t::event_msg, get_received_cmd_frame(), and PACKED::status.
Referenced by dfu_program_memory_erase(), dfu_program_memory_read(), dfu_program_memory_write(), and dfu_program_memory_write_continue().
|
static |
References BM_PROGRAM_HCI_CONN, PACKED::conn_handle, event_msg_t::data, PACKED::event, event_t::event_msg, get_received_cmd_frame(), and PACKED::status.
Referenced by dfu_init().
|
static |
References BM_PROGRAM_HCI_COMPLETE, BM_PROGRAM_HCI_NOCP, BM_PROGRAM_HCI_STATUS, PACKED::conn_handle, PACKED::conn_num, event_msg_t::data, DFU_FAIL, DFU_SUCCESS, PACKED::error, PACKED::event, event_t::event_msg, get_received_cmd_frame(), PACKED::pkt_num, program_handle, and PACKED::status.
Referenced by dfu_init(), dfu_program_memory_erase(), dfu_program_memory_read(), dfu_program_memory_write(), and dfu_program_memory_write_continue().
BM_PROGRAM_CMDPKT* program_cmdpkt = NULL |
|
static |