*/
FLASH_BANK_COMMAND_HANDLER(stm32x_flash_bank_command)
{
- stm32x_flash_bank_t *stm32x_info;
+ struct stm32x_flash_bank *stm32x_info;
if (argc < 6)
{
return ERROR_FLASH_BANK_INVALID;
}
- stm32x_info = malloc(sizeof(stm32x_flash_bank_t));
+ stm32x_info = malloc(sizeof(struct stm32x_flash_bank));
bank->driver_priv = stm32x_info;
stm32x_info->write_algorithm = NULL;
static int stm32x_read_options(struct flash_bank_s *bank)
{
uint32_t optiondata;
- stm32x_flash_bank_t *stm32x_info = NULL;
+ struct stm32x_flash_bank *stm32x_info = NULL;
target_t *target = bank->target;
stm32x_info = bank->driver_priv;
static int stm32x_erase_options(struct flash_bank_s *bank)
{
- stm32x_flash_bank_t *stm32x_info = NULL;
+ struct stm32x_flash_bank *stm32x_info = NULL;
target_t *target = bank->target;
uint32_t status;
static int stm32x_write_options(struct flash_bank_s *bank)
{
- stm32x_flash_bank_t *stm32x_info = NULL;
+ struct stm32x_flash_bank *stm32x_info = NULL;
target_t *target = bank->target;
uint32_t status;
static int stm32x_protect_check(struct flash_bank_s *bank)
{
target_t *target = bank->target;
- stm32x_flash_bank_t *stm32x_info = bank->driver_priv;
+ struct stm32x_flash_bank *stm32x_info = bank->driver_priv;
uint32_t protection;
int i, s;
static int stm32x_protect(struct flash_bank_s *bank, int set, int first, int last)
{
- stm32x_flash_bank_t *stm32x_info = NULL;
+ struct stm32x_flash_bank *stm32x_info = NULL;
target_t *target = bank->target;
uint16_t prot_reg[4] = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF};
int i, reg, bit;
static int stm32x_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
{
- stm32x_flash_bank_t *stm32x_info = bank->driver_priv;
+ struct stm32x_flash_bank *stm32x_info = bank->driver_priv;
target_t *target = bank->target;
uint32_t buffer_size = 16384;
working_area_t *source;
static int stm32x_probe(struct flash_bank_s *bank)
{
target_t *target = bank->target;
- stm32x_flash_bank_t *stm32x_info = bank->driver_priv;
+ struct stm32x_flash_bank *stm32x_info = bank->driver_priv;
int i;
uint16_t num_pages;
uint32_t device_id;
static int stm32x_auto_probe(struct flash_bank_s *bank)
{
- stm32x_flash_bank_t *stm32x_info = bank->driver_priv;
+ struct stm32x_flash_bank *stm32x_info = bank->driver_priv;
if (stm32x_info->probed)
return ERROR_OK;
return stm32x_probe(bank);
COMMAND_HANDLER(stm32x_handle_lock_command)
{
target_t *target = NULL;
- stm32x_flash_bank_t *stm32x_info = NULL;
+ struct stm32x_flash_bank *stm32x_info = NULL;
if (argc < 1)
{
COMMAND_HANDLER(stm32x_handle_unlock_command)
{
target_t *target = NULL;
- stm32x_flash_bank_t *stm32x_info = NULL;
+ struct stm32x_flash_bank *stm32x_info = NULL;
if (argc < 1)
{
{
uint32_t optionbyte;
target_t *target = NULL;
- stm32x_flash_bank_t *stm32x_info = NULL;
+ struct stm32x_flash_bank *stm32x_info = NULL;
if (argc < 1)
{
COMMAND_HANDLER(stm32x_handle_options_write_command)
{
target_t *target = NULL;
- stm32x_flash_bank_t *stm32x_info = NULL;
+ struct stm32x_flash_bank *stm32x_info = NULL;
uint16_t optionbyte = 0xF8;
if (argc < 4)