dRonin
adbada4
dRonin firmware
|
#include <pios.h>
#include <pios_board_info.h>
#include <stdbool.h>
#include "pios_iap.h"
#include "pios_com_msg.h"
#include "pios_usbhook.h"
#include "pios_bl_helper.h"
#include "led_pwm.h"
#include "bl_messages.h"
#include "bl_xfer.h"
Go to the source code of this file.
Data Structures | |
struct | bl_fsm_context |
struct | bl_transition |
Macros | |
#define | MSEC_TO_USEC(ms) ((ms) * 1000) |
#define | SEC_TO_MSEC(s) ((s) * 1000) |
#define | SEC_TO_USEC(s) ((s) * 1000 * 1000) |
#define | BL_DETECT_BREAK_TO_BL_TIMER_WITH_VSENSE MSEC_TO_USEC(2) |
#define | BL_DETECT_BREAK_TO_BL_TIMER_NO_VSENSE MSEC_TO_USEC(500) |
#define | BL_WAIT_FOR_DFU_TIMER SEC_TO_USEC(6) |
#define | BL_RECOVER_FROM_FAULT_TIMER SEC_TO_USEC(10) |
Functions | |
void | PIOS_Board_Init (void) |
static void | go_fsm_fault (struct bl_fsm_context *context) |
static void | go_detect_break_to_bl (struct bl_fsm_context *context) |
static void | go_wait_for_dfu (struct bl_fsm_context *context) |
static void | go_jumping_to_app (struct bl_fsm_context *context) |
static void | go_dfu_idle (struct bl_fsm_context *context) |
static void | go_read_in_progress (struct bl_fsm_context *context) |
static void | go_write_in_progress (struct bl_fsm_context *context) |
static void | go_dfu_operation_ok (struct bl_fsm_context *context) |
static void | go_dfu_operation_failed (struct bl_fsm_context *context) |
static enum bl_states | bl_fsm_get_state (struct bl_fsm_context *context) |
static void | bl_fsm_timer_start (struct bl_fsm_context *context, uint32_t timer_duration_us) |
static void | bl_fsm_timer_cancel (struct bl_fsm_context *context) |
static void | bl_fsm_timer_add_ticks (struct bl_fsm_context *context, uint32_t elapsed_us) |
static bool | bl_fsm_timer_expired_p (struct bl_fsm_context *context) |
static void | bl_fsm_process_auto (struct bl_fsm_context *context) |
static void | bl_fsm_inject_event (struct bl_fsm_context *context, enum bl_events event) |
static void | bl_fsm_init (struct bl_fsm_context *context) |
static void | process_packet_rx (struct bl_fsm_context *context, const struct bl_messages *msg) |
int | main (void) |
static bool | bl_select_dfu_device (struct bl_fsm_context *context, uint8_t device_number) |
static bool | bl_send_status (struct bl_fsm_context *context) |
static bool | bl_send_capabilities (struct bl_fsm_context *context, uint8_t device_number) |
Variables | |
static const uint8_t | fsm_to_dfu_state_map [] |
bool | have_vsense |
static const struct bl_transition | bl_transitions [BL_STATE_NUM_STATES] |
Definition in file main.c.