Monitor functions for SAM-BA on SAM0 Port of rom monitor functions from legacy sam-ba software.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include <string.h>
#include "sam_ba_monitor.h"
#include "usart_sam_ba.h"
#include "conf_board.h"
Data Structures | |
struct | t_monitor_if |
Functions | |
void | call_applet (uint32_t address) |
Execute an applet from the specified address. More... | |
void | sam_ba_monitor_init (uint8_t com_interface) |
This function initializes the SAM-BA monitor. More... | |
void | sam_ba_monitor_run (void) |
This function starts the SAM-BA monitor. More... | |
void | sam_ba_putdata_term (uint8_t *data, uint32_t length) |
This function allows data rx by USART. More... | |
Variables | |
volatile bool | b_terminal_mode = false |
uint8_t | command |
uint32_t | current_number |
uint8_t | data [SIZEBUFMAX] |
uint32_t | i |
uint8_t | j |
uint32_t | length |
uint8_t * | ptr |
uint8_t * | ptr_data |
t_monitor_if * | ptr_monitor_if |
const char | RomBOOT_Version [] = SAM_BA_VERSION |
volatile uint32_t | sp |
uint32_t | u32tmp |
const t_monitor_if | uart_if |
void call_applet | ( | uint32_t | address | ) |
Execute an applet from the specified address.
address | Applet address |
References cpu_irq_disable, and sp.
Referenced by sam_ba_monitor_run().
void sam_ba_monitor_init | ( | uint8_t | com_interface | ) |
This function initializes the SAM-BA monitor.
Initialize the monitor.
com_interface | Communication interface to be used. |
References SAM_BA_INTERFACE_USART, and SAM_BA_INTERFACE_USBCDC.
Referenced by main().
void sam_ba_monitor_run | ( | void | ) |
This function starts the SAM-BA monitor.
Main function of the SAM-BA Monitor.
References b_terminal_mode, call_applet(), command, cpu_irq_enable, current_number, data, t_monitor_if::getdata, t_monitor_if::getdata_xmd, i, j, length, min, NULL, ptr, ptr_data, t_monitor_if::putdata, t_monitor_if::putdata_xmd, RomBOOT_Version, sam_ba_putdata_term(), SIZEBUFMAX, sp, and u32tmp.
Referenced by main().
void sam_ba_putdata_term | ( | uint8_t * | data, |
uint32_t | length | ||
) |
This function allows data rx by USART.
*data | Data pointer |
length | Length of the data |
References b_terminal_mode, buf, i, and t_monitor_if::putdata.
Referenced by sam_ba_monitor_run().
Referenced by sam_ba_monitor_run(), and sam_ba_putdata_term().
uint8_t command |
Referenced by nwkRxSendAck(), nwkTxAckReceived(), and sam_ba_monitor_run().
uint32_t current_number |
Referenced by sam_ba_monitor_run().
uint8_t data[SIZEBUFMAX] |
uint32_t i |
uint8_t j |
Referenced by _eeprom_emulator_check_logical_page(), _rww_eeprom_emulator_check_logical_page(), _system_extint_init(), base64decode(), extint_disable_events(), extint_enable_events(), get_match_length(), http_client_send_request(), i2s_init(), input_callback(), io1_board_get_info(), IperfUpdate(), iso7816_data_block_atr(), iso7816_decode_atr(), isSubStr(), mac_sequence_register_seqno(), make_addresses(), make_neighbor_roomfor(), make_routes_roomfor(), memp_init(), nm_usart_send_regval(), nmi_inet_addr(), run_i2s_polled_mode_test(), sam_ba_monitor_run(), setup_board(), show_extension_boards_information(), slip_poll_handler(), spi_flash_erase(), spi_transceive_wait(), uiplib_ip4addrconv(), and usb_init().
uint32_t length |
Referenced by _dbg_request_free_space(), _exosite_example_http_read(), _http_client_read_chuked_entity(), _http_client_request(), _spi_master_vec_int_handler(), _spi_read_buffer(), _spi_transceive_buffer(), _spi_write_buffer(), _usart_read_buffer(), _usart_write_buffer(), adp_interface_send(), at25dfx_chip_read_buffer(), at30tse_eeprom_read(), brd_adv_appearance(), brd_adv_comp_list_service_uuid128(), brd_adv_comp_list_service_uuid16(), brd_adv_comp_list_service_uuid32(), brd_adv_comp_local_name(), brd_adv_incomp_list_service_uuid128(), brd_adv_incomp_list_service_uuid16(), brd_adv_incomp_list_service_uuid32(), brd_adv_manufacturer_data(), brd_adv_shortened_local_name(), buffered_uart_tx(), crc32_recalculate(), csc_serv_send_data(), dac_chan_write_buffer_job(), dbg_print_str(), decodeLength(), eddystone_adv_start(), extractClientToken(), getbytes(), handle_tcpip_recv(), hid_boot_keyboardreport_update(), hid_boot_mousereport_update(), http_socket_get(), i2c_slave_read_packet_wait(), i2c_slave_write_packet_wait(), ieee11073_decode_metadata(), nvm_read_buffer(), nvm_update_buffer(), nvm_write_buffer(), pbuf_alloc(), sam_ba_monitor_run(), sio2host_tx(), sio2ncp_tx(), spi_master_vec_transceive_buffer_job(), spi_transceive_buffer_wait(), spi_write_buffer_wait(), store_file_packet(), tal_dump_registers(), udi_msc_spc_inquiry(), udi_msc_spc_requestsense(), uhc_request_bos_desc(), uip_ds6_route_add(), usart_getdata_xmd(), usart_putdata(), and usart_putdata_xmd().
uint8_t * ptr |
uint8_t * ptr_data |
Referenced by sam_ba_monitor_run(), usart_getdata_xmd(), and usart_putdata_xmd().
t_monitor_if* ptr_monitor_if |
const char RomBOOT_Version[] = SAM_BA_VERSION |
Referenced by sam_ba_monitor_run().
volatile uint32_t sp |
Referenced by call_applet(), and sam_ba_monitor_run().
uint32_t u32tmp |
Referenced by sam_ba_monitor_run().
const t_monitor_if uart_if |