Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: i2c_ram_defines.h
- Revision:
- 0:be95bfb06686
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/i2c_ram_defines.h Mon Jan 17 13:20:09 2022 +0000 @@ -0,0 +1,98 @@ +// Generated by 90418_MEMmap.xlsm on 2021-06-03 10:02 +// RAM zone defines +#define DMA_START_RAM_ZONE_RAM_STACK 0x1220 +#define DMA_START_RAM_ZONE_RAM_GLOBAL_VARIABLES 0x1200 +#define DMA_START_RAM_ZONE_RAM_PATCH_TRIM 0x11E0 +#define DMA_START_RAM_ZONE_RAM_PATCH_EXTENSION 0x1094 +#define DMA_START_RAM_ZONE_RAM_MLX_CALIBRATION 0x1064 +#define DMA_START_RAM_ZONE_RAM_MLX_I2C_REGISTER_MAPPING 0x105C +#define DMA_START_RAM_ZONE_RAM_APPLICATION_TRIMMING 0x1010 +#define DMA_START_RAM_ZONE_RAM_I2C_REGISTER_MAPPING 0x1000 + + +// I2C RAM command defines +#define I2C_RAM_PATCH_TRIM_0 0x00F0 +#define I2C_CRC_PATCH_23 0x004B +#define I2C_CRC_PATCH_01 0x004A +#define I2C_MLX_CALIB_23 0x0049 +#define I2C_MLX_CALIB_22 0x0048 +#define I2C_MLX_CALIB_21 0x0047 +#define I2C_MLX_CALIB_20 0x0046 +#define I2C_MLX_CALIB_19 0x0045 +#define I2C_MLX_CALIB_18 0x0044 +#define I2C_MLX_CALIB_17 0x0043 +#define I2C_MLX_CALIB_16 0x0042 +#define I2C_MLX_CALIB_15 0x0041 +#define I2C_MLX_CALIB_14 0x0040 +#define I2C_MLX_CALIB_13 0x003F +#define I2C_MLX_CALIB_12 0x003E +#define I2C_MLX_CALIB_11 0x003D +#define I2C_MLX_CALIB_10 0x003C +#define I2C_MLX_CALIB_9 0x003B +#define I2C_MLX_CALIB_8 0x003A +#define I2C_MLX_CALIB_7 0x0039 +#define I2C_MLX_CALIB_6 0x0038 +#define I2C_MLX_CALIB_5 0x0037 +#define I2C_MLX_CALIB_4 0x0036 +#define I2C_MLX_CALIB_3 0x0035 +#define I2C_MLX_CALIB_2 0x0034 +#define I2C_CLIM_SET 0x0033 +#define I2C_CLIM_CALIB 0x0032 +#define I2C_CMD_INTERPRETER_DATA 0x0031 +#define I2C_CMD_INTERPRETER_ADDRESS 0x0030 +#define I2C_STARTUP_FLAGS_2 0x002F +#define I2C_STARTUP_FLAGS_1 0x002E +#define I2C_MTP_CFGZONE_0 0x002D +#define I2C_CUST_ID0 0x002C +#define I2C_CUST_ID1 0x002B +#define I2C_CUST_ID2 0x002A +#define I2C_CUST_ID3 0x0029 +#define I2C_DIGITAL_CFG 0x0028 +#define I2C_ZONE0_RES1 0x0027 +#define I2C_ZONE0_RES2 0x0026 +#define I2C_ZONE0_RES3 0x0025 +#define I2C_ZONE0_RES4 0x0024 +#define I2C_CLIM_USER_1 0x0023 +#define I2C_CLIM_USER_0 0x0022 +#define I2C_OC_CL_CTRL 0x0021 +#define I2C_DI_TH_1ST_REG 0x0020 +#define I2C_DI_TH_2ND_REG 0x001F +#define I2C_I_ZC_TH_HIGH_REG 0x001E +#define I2C_I_ZC_TH_LOW_REG 0x001D +#define I2C_CURVE_PAR_F 0x001C +#define I2C_CURVE_PAR_E 0x001B +#define I2C_CURVE_PAR_D 0x001A +#define I2C_CURVE_PAR_C 0x0019 +#define I2C_CURVE_PAR_B 0x0018 +#define I2C_CURVE_PAR_A 0x0017 +#define I2C_CURVE_PNT_MAX 0x0016 +#define I2C_CURVE_PNT_MIN 0x0015 +#define I2C_SPD_CTRL_2 0x0014 +#define I2C_SPD_CTRL_1 0x0013 +#define I2C_MIN_EHP 0x0012 +#define I2C_POSITION2 0x0011 +#define I2C_WIND_BRAKE2 0x0010 +#define I2C_WIND_BRAKE 0x000F +#define I2C_START_UP 0x000E +#define I2C_POSITION 0x000D +#define I2C_GEN_CTRL 0x000C +#define I2C_APPLICATION_CFG4 0x000B +#define I2C_APPLICATION_CFG3 0x000A +#define I2C_APPLICATION_CFG2 0x0009 +#define I2C_APPLICATION_CFG 0x0008 +#define I2C_STATE 0x0007 +#define I2C_I2C_RESERVED_2 0x0006 +#define I2C_TEMPERATURE 0x0005 +#define I2C_STATUS 0x0004 +#define I2C_FEEDBACK 0x0003 +#define I2C_COMMAND_KEY 0x0002 +#define I2C_COMMAND_CONTROL 0x0001 +#define I2C_SPEED_DUTY 0x0000 + +// Useful masks +#define I2C_STATUS_COMMAND_BUSY_MASK (1u << 4u) +#define I2C_STATE_COMM_STATE_MASK (0xFF) +#define I2C_STATE_COMM_STATE_OFFSET (0u) + + +