]> git.sur5r.net Git - openocd/blobdiff - src/flash/mflash.h
Minor fixes to new at91sam3 files for x86-32/64 compilation problems.
[openocd] / src / flash / mflash.h
index b42eaeffff0d4a9f6c43567ea065f16facfc6ae1..bfaf743e92bd14c68eec2c435bac37df2c098df8 100644 (file)
@@ -36,7 +36,7 @@ typedef struct mflash_gpio_drv_s
 {
        char *name;
        int (*set_gpio_to_output) (mflash_gpio_num_t gpio);
-       int (*set_gpio_output_val) (mflash_gpio_num_t gpio, u8 val);
+       int (*set_gpio_output_val) (mflash_gpio_num_t gpio, uint8_t val);
 } mflash_gpio_drv_t;
 
 typedef struct _mg_io_type_drv_info {
@@ -127,12 +127,12 @@ typedef struct _mg_pll_t
 
 typedef struct mg_drv_info_s {
        mg_io_type_drv_info drv_id;
-       u32 tot_sects;
+       uint32_t tot_sects;
 } mg_drv_info_t;
 
 typedef struct mflash_bank_s
 {
-       u32 base;
+       uint32_t base;
 
        mflash_gpio_num_t rst_pin;
 
@@ -178,6 +178,13 @@ extern int mflash_init_drivers(struct command_context_s *cmd_ctx);
 
 #define MG_FILEIO_CHUNK 1048576
 
+#define ERROR_MG_IO (-1600)
+#define ERROR_MG_TIMEOUT (-1601)
+#define ERROR_MG_INVALID_PLL (-1603)
+#define ERROR_MG_INTERFACE (-1604)
+#define ERROR_MG_INVALID_OSC (-1605)
+#define ERROR_MG_UNSUPPORTED_SOC (-1606)
+
 typedef enum _mg_io_type_wait{
 
        mg_io_wait_bsy       = 1,
@@ -287,7 +294,7 @@ typedef enum _mg_vcmd
 typedef enum _mg_opmode
 {
        mg_op_mode_xip = 1, /* TRUE XIP */
-       mg_op_mode_snd = 2, /* BOOT+Storage */
+       mg_op_mode_snd = 2, /* BOOT + Storage */
        mg_op_mode_stg = 0  /* Only Storage */
 } mg_opmode;