1 /*********************************************************************************************************************** 2 * Copyright [2015-2017] Renesas Electronics Corporation and/or its licensors. All Rights Reserved. 3 * 4 * This file is part of Renesas SynergyTM Software Package (SSP) 5 * 6 * The contents of this file (the "contents") are proprietary and confidential to Renesas Electronics Corporation 7 * and/or its licensors ("Renesas") and subject to statutory and contractual protections. 8 * 9 * This file is subject to a Renesas SSP license agreement. Unless otherwise agreed in an SSP license agreement with 10 * Renesas: 1) you may not use, copy, modify, distribute, display, or perform the contents; 2) you may not use any name 11 * or mark of Renesas for advertising or publicity purposes or in connection with your use of the contents; 3) RENESAS 12 * MAKES NO WARRANTY OR REPRESENTATIONS ABOUT THE SUITABILITY OF THE CONTENTS FOR ANY PURPOSE; THE CONTENTS ARE PROVIDED 13 * "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 14 * PARTICULAR PURPOSE, AND NON-INFRINGEMENT; AND 4) RENESAS SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, OR 15 * CONSEQUENTIAL DAMAGES, INCLUDING DAMAGES RESULTING FROM LOSS OF USE, DATA, OR PROJECTS, WHETHER IN AN ACTION OF 16 * CONTRACT OR TORT, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE CONTENTS. Third-party contents 17 * included in this file may be subject to different terms. 18 **********************************************************************************************************************/ 19 20 /********************************************************************************************************************** 21 * File Name : ssp_common_api.h 22 * Description : Common definitions used by all AMS layers. Includes error codes and version structure. 23 **********************************************************************************************************************/ 24 25 #ifndef SSP_COMMON_API_H 26 #define SSP_COMMON_API_H 27 28 /*********************************************************************************************************************** 29 * Includes 30 **********************************************************************************************************************/ 31 #include <assert.h> 32 #include <stdint.h> 33 34 /* Includes SSP version macros. */ 35 #include "ssp_version.h" 36 37 /*******************************************************************************************************************//** 38 * @ingroup Common_Error_Codes 39 * @{ 40 **********************************************************************************************************************/ 41 42 /********************************************************************************************************************** 43 * Macro definitions 44 **********************************************************************************************************************/ 45 /** This macro is used to suppress compiler messages about a parameter not being used in a function. The nice thing 46 * about using this implementation is that it does not take any extra RAM or ROM. */ 47 /*LDRA_INSPECTED 340 s */ 48 #define SSP_PARAMETER_NOT_USED(p) (void) ((p)) 49 50 /** Determine if a C++ compiler is being used. 51 * If so, ensure that standard C is used to process the API information. */ 52 #if defined(__cplusplus) 53 #define SSP_CPP_HEADER extern "C" { 54 #define SSP_CPP_FOOTER } 55 #else 56 #define SSP_CPP_HEADER 57 #define SSP_CPP_FOOTER 58 #endif 59 60 /* SSP Header and Footer definitions */ 61 #define SSP_HEADER SSP_CPP_HEADER 62 #define SSP_FOOTER SSP_CPP_FOOTER 63 64 /********************************************************************************************************************** 65 * Typedef definitions 66 **********************************************************************************************************************/ 67 /** Common error codes */ 68 typedef enum e_ssp_err 69 { 70 SSP_SUCCESS = 0, 71 72 SSP_ERR_ASSERTION = 1, ///< A critical assertion has failed 73 SSP_ERR_INVALID_POINTER = 2, ///< Pointer points to invalid memory location 74 SSP_ERR_INVALID_ARGUMENT = 3, ///< Invalid input parameter 75 SSP_ERR_INVALID_CHANNEL = 4, ///< Selected channel does not exist 76 SSP_ERR_INVALID_MODE = 5, ///< Unsupported or incorrect mode 77 SSP_ERR_UNSUPPORTED = 6, ///< Selected mode not supported by this API 78 SSP_ERR_NOT_OPEN = 7, ///< Requested channel is not configured or API not open 79 SSP_ERR_IN_USE = 8, ///< Channel/peripheral is running/busy 80 SSP_ERR_OUT_OF_MEMORY = 9, ///< Allocate more memory in the driver's cfg.h 81 SSP_ERR_HW_LOCKED = 10, ///< Hardware is locked 82 SSP_ERR_IRQ_BSP_DISABLED = 11, ///< IRQ not enabled in BSP 83 SSP_ERR_OVERFLOW = 12, ///< Hardware overflow 84 SSP_ERR_UNDERFLOW = 13, ///< Hardware underflow 85 SSP_ERR_ALREADY_OPEN = 14, ///< Requested channel is already open in a different configuration 86 SSP_ERR_APPROXIMATION = 15, ///< Could not set value to exact result 87 SSP_ERR_CLAMPED = 16, ///< Value had to be limited for some reason 88 SSP_ERR_INVALID_RATE = 17, ///< Selected rate could not be met 89 SSP_ERR_ABORTED = 18, ///< An operation was aborted 90 SSP_ERR_NOT_ENABLED = 19, ///< Requested operation is not enabled 91 SSP_ERR_TIMEOUT = 20, ///< Timeout error 92 SSP_ERR_INVALID_BLOCKS = 21, ///< Invalid number of blocks supplied 93 SSP_ERR_INVALID_ADDRESS = 22, ///< Invalid address supplied 94 SSP_ERR_INVALID_SIZE = 23, ///< Invalid size/length supplied for operation 95 SSP_ERR_WRITE_FAILED = 24, ///< Write operation failed 96 SSP_ERR_ERASE_FAILED = 25, ///< Erase operation failed 97 SSP_ERR_INVALID_CALL = 26, ///< Invalid function call is made 98 SSP_ERR_INVALID_HW_CONDITION = 27, ///< Detected hardware is in invalid condition 99 SSP_ERR_INVALID_FACTORY_FLASH = 28, ///< Factory flash is not available on this MCU 100 SSP_ERR_INVALID_FMI_DATA = 29, ///< Linked FMI data table is not valid 101 SSP_ERR_INVALID_STATE = 30, ///< API or command not valid in the current state 102 SSP_ERR_NOT_ERASED = 31, ///< Erase verification failed 103 SSP_ERR_SECTOR_RELEASE_FAILED = 32, ///< Sector release failed 104 105 /** Start of RTOS only error codes */ 106 SSP_ERR_INTERNAL = 100, ///< Internal error 107 SSP_ERR_WAIT_ABORTED = 101, ///< Wait 108 109 /** Start of UART specific */ 110 SSP_ERR_FRAMING = 200, ///< Framing error occurs 111 SSP_ERR_BREAK_DETECT = 201, ///< Break signal detects 112 SSP_ERR_PARITY = 202, ///< Parity error occurs 113 SSP_ERR_RXBUF_OVERFLOW = 203, ///< Receive queue overflow 114 SSP_ERR_QUEUE_UNAVAILABLE = 204, ///< Can't open s/w queue 115 SSP_ERR_INSUFFICIENT_SPACE = 205, ///< Not enough space in transmission circular buffer 116 SSP_ERR_INSUFFICIENT_DATA = 206, ///< Not enough data in receive circular buffer 117 118 /** Start of SPI specific */ 119 SSP_ERR_TRANSFER_ABORTED = 300, ///< The data transfer was aborted. 120 SSP_ERR_MODE_FAULT = 301, ///< Mode fault error. 121 SSP_ERR_READ_OVERFLOW = 302, ///< Read overflow. 122 SSP_ERR_SPI_PARITY = 303, ///< Parity error. 123 SSP_ERR_OVERRUN = 304, ///< Overrun error. 124 125 /** Start of CGC Specific */ 126 SSP_ERR_CLOCK_INACTIVE = 400, ///< Inactive clock specified as system clock. 127 SSP_ERR_CLOCK_ACTIVE = 401, ///< Active clock source cannot be modified without stopping first. 128 SSP_ERR_STABILIZED = 402, ///< Clock has stabilized after its been turned on/off 129 SSP_ERR_NOT_STABILIZED = 403, ///< Clock has not stabilized after its been turned on/off 130 SSP_ERR_MAIN_OSC_INACTIVE = 404, ///< PLL initialization attempted when main osc is turned off 131 SSP_ERR_OSC_STOP_DET_ENABLED = 405, ///< Illegal attempt to stop LOCO when Oscillation stop is enabled 132 SSP_ERR_OSC_STOP_DETECTED = 406, ///< The Oscillation stop detection status flag is set 133 SSP_ERR_OSC_STOP_CLOCK_ACTIVE = 407, ///< Attempt to clear Oscillation Stop Detect Status with PLL/MAIN_OSC active 134 SSP_ERR_CLKOUT_EXCEEDED = 408, ///< Output on target output clock pin exceeds maximum supported limit 135 SSP_ERR_USB_MODULE_ENABLED = 409, ///< USB clock configure request with USB Module enabled 136 SSP_ERR_HARDWARE_TIMEOUT = 410, ///< A register read or write timed out 137 138 /** Start of FLASH Specific */ 139 SSP_ERR_PE_FAILURE = 500, ///< Unable to enter Programming mode. 140 SSP_ERR_CMD_LOCKED = 501, ///< Peripheral in command locked state 141 SSP_ERR_FCLK = 502, ///< FCLK must be >= 4 MHz 142 SSP_ERR_INVALID_LINKED_ADDRESS = 503, ///< Function or data are linked at an invalid region of memory 143 144 /** Start of CAC Specific */ 145 SSP_ERR_INVALID_CAC_REF_CLOCK = 600, ///< Measured clock rate < reference clock rate 146 147 /** Start of GLCD Specific */ 148 SSP_ERR_CLOCK_GENERATION = 1000, ///< Clock cannot be specified as system clock 149 SSP_ERR_INVALID_TIMING_SETTING = 1001, ///< Invalid timing parameter 150 SSP_ERR_INVALID_LAYER_SETTING = 1002, ///< Invalid layer parameter 151 SSP_ERR_INVALID_ALIGNMENT = 1003, ///< Invalid memory alignment found 152 SSP_ERR_INVALID_GAMMA_SETTING = 1004, ///< Invalid gamma correction parameter 153 SSP_ERR_INVALID_LAYER_FORMAT = 1005, ///< Invalid color format in layer 154 SSP_ERR_INVALID_UPDATE_TIMING = 1006, ///< Invalid timing for register update 155 SSP_ERR_INVALID_CLUT_ACCESS = 1007, ///< Invalid access to CLUT entry 156 SSP_ERR_INVALID_FADE_SETTING = 1008, ///< Invalid fade-in/fade-out setting 157 158 /** Start of JPEG Specific */ 159 SSP_ERR_JPEG_ERR = 1100, ///< JPEG error 160 SSP_ERR_JPEG_SOI_NOT_DETECTED = 1101, ///< SOI not detected until EOI detected. 161 SSP_ERR_JPEG_SOF1_TO_SOFF_DETECTED = 1102, ///< SOF1 to SOFF detected. 162 SSP_ERR_JPEG_UNSUPPORTED_PIXEL_FORMAT = 1103, ///< Unprovided pixel format detected. 163 SSP_ERR_JPEG_SOF_ACCURACY_ERROR = 1104, ///< SOF accuracy error: other than 8 detected. 164 SSP_ERR_JPEG_DQT_ACCURACY_ERROR = 1105, ///< DQT accuracy error: other than 0 detected. 165 SSP_ERR_JPEG_COMPONENT_ERROR1 = 1106, ///< Component error1: the number of SOF0 header components detected is other than 1,3,or 4. 166 SSP_ERR_JPEG_COMPONENT_ERROR2 = 1107, ///< Component error2: the number of components differs between SOF0 header and SOS. 167 SSP_ERR_JPEG_SOF0_DQT_DHT_NOT_DETECTED = 1108, ///< SOF0, DQT, and DHT not detected when SOS detected. 168 SSP_ERR_JPEG_SOS_NOT_DETECTED = 1109, ///< SOS not detected: SOS not detected until EOI detected. 169 SSP_ERR_JPEG_EOI_NOT_DETECTED = 1110, ///< EOI not detected (default) 170 SSP_ERR_JPEG_RESTART_INTERVAL_DATA_NUMBER_ERROR = 1111, ///< Restart interval data number error detected. 171 SSP_ERR_JPEG_IMAGE_SIZE_ERROR = 1112, ///< Image size error detected. 172 SSP_ERR_JPEG_LAST_MCU_DATA_NUMBER_ERROR = 1113, ///< Last MCU data number error detected. 173 SSP_ERR_JPEG_BLOCK_DATA_NUMBER_ERROR = 1114, ///< Block data number error detected. 174 SSP_ERR_JPEG_BUFFERSIZE_NOT_ENOUGH = 1115, ///< User provided buffer size not enough 175 SSP_ERR_JPEG_UNSUPPORTED_IMAGE_SIZE = 1116, ///< JPEG Image size is not aligned with MCU 176 177 /** Start of touch panel framework specific */ 178 SSP_ERR_CALIBRATE_FAILED = 1200, ///< Calibration failed 179 180 /** Start of FMI specific */ 181 SSP_ERR_IP_HARDWARE_NOT_PRESENT = 1400, ///< Requested IP does not exist on this device 182 SSP_ERR_IP_UNIT_NOT_PRESENT = 1401, ///< Requested unit does not exist on this device 183 SSP_ERR_IP_CHANNEL_NOT_PRESENT = 1402, ///< Requested channel does not exist on this device 184 185 /** Start of Message framework specific */ 186 SSP_ERR_NO_MORE_BUFFER = 2000, ///< No more buffer found in the memory block pool 187 SSP_ERR_ILLEGAL_BUFFER_ADDRESS = 2001, ///< Buffer address is out of block memory pool 188 SSP_ERR_INVALID_WORKBUFFER_SIZE = 2002, ///< Work buffer size is invalid 189 SSP_ERR_INVALID_MSG_BUFFER_SIZE = 2003, ///< Message buffer size is invalid 190 SSP_ERR_TOO_MANY_BUFFERS = 2004, ///< Number of buffer is too many 191 SSP_ERR_NO_SUBSCRIBER_FOUND = 2005, ///< No message subscriber found 192 SSP_ERR_MESSAGE_QUEUE_EMPTY = 2006, ///< No message found in the message queue 193 SSP_ERR_MESSAGE_QUEUE_FULL = 2007, ///< No room for new message in the message queue 194 SSP_ERR_ILLEGAL_SUBSCRIBER_LISTS= 2008, ///< Message subscriber lists is illegal 195 SSP_ERR_BUFFER_RELEASED = 2009, ///< Buffer has been released 196 197 /** Start of 2DG Driver specific */ 198 SSP_ERR_D2D_ERROR_INIT = 3000, ///< Dave/2d has an error in the initialization 199 SSP_ERR_D2D_ERROR_DEINIT = 3001, ///< Dave/2d has an error in the initialization 200 SSP_ERR_D2D_ERROR_RENDERING = 3002, ///< Dave/2d has an error in the rendering 201 SSP_ERR_D2D_ERROR_SIZE = 3003, ///< Dave/2d has an error in the rendering 202 203 /** Start of BYTEQ library specific */ 204 SSP_ERR_QUEUE_FULL = 10000, ///< Queue is full, cannot queue another data 205 SSP_ERR_QUEUE_EMPTY = 10001, ///< Queue is empty, no data to dequeue 206 207 /** Sensor count overflowed when performing CTSU scan. @note User must clear the CTSUSCOVF bit manually. */ 208 SSP_ERR_CTSU_SC_OVERFLOW = 0x8010, 209 /** Reference count overflowed when performing CTSU scan. @note User must clear the CTSURCOVF bit manually. */ 210 SSP_ERR_CTSU_RC_OVERFLOW = 0x8020, 211 /** Abnormal TSCAP voltage. @note User must clear the CTSUICOMP bit manually. */ 212 SSP_ERR_CTSU_ICOMP = 0x8040, 213 /** Auto tuning algorithm failed. */ 214 SSP_ERR_CTSU_OFFSET_ADJUSTMENT_FAILED = 0x8080, 215 /** Safety check failed **/ 216 SSP_ERR_CTSU_SAFETY_CHECK_FAILED = 0x8100, 217 218 /** Start of SDMMC specific */ 219 SSP_ERR_CARD_INIT_FAILED = 40000, ///< SD card or eMMC device failed to initialize. 220 SSP_ERR_CARD_NOT_INSERTED = 40001, ///< SD card not installed. 221 SSP_ERR_SDHI_FAILED = 40002, ///< SD peripheral failed to respond properly. 222 SSP_ERR_READ_FAILED = 40003, ///< Data read failed. 223 SSP_ERR_CARD_NOT_READY = 40004, ///< SD card was removed. 224 SSP_ERR_CARD_WRITE_PROTECTED = 40005, ///< Media is write protected. 225 SSP_ERR_TRANSFER_BUSY = 40006, ///< Transfer in progress. 226 227 /** Start of FX_IO specific */ 228 SSP_ERR_MEDIA_FORMAT_FAILED = 50000, ///< Media format failed. 229 SSP_ERR_MEDIA_OPEN_FAILED = 50001, ///< Media open failed. 230 231 /** Start of CAN specific */ 232 SSP_ERR_CAN_DATA_UNAVAILABLE = 60000, ///< No data available. 233 SSP_ERR_CAN_MODE_SWITCH_FAILED = 60001, ///< Switching operation modes failed. 234 SSP_ERR_CAN_INIT_FAILED = 60002, ///< Hardware initialization failed. 235 SSP_ERR_CAN_TRANSMIT_NOT_READY = 60003, ///< Transmit in progress. 236 SSP_ERR_CAN_RECEIVE_MAILBOX = 60004, ///< Mailbox is setup as a receive mailbox. 237 SSP_ERR_CAN_TRANSMIT_MAILBOX = 60005, ///< Mailbox is setup as a transmit mailbox. 238 SSP_ERR_CAN_MESSAGE_LOST = 60006, ///< Receive message has been overwritten or overrun. 239 240 /** Start of SF_WIFI Specific */ 241 SSP_ERR_WIFI_CONFIG_FAILED = 70000, ///< WiFi module Configuration failed. 242 SSP_ERR_WIFI_INIT_FAILED = 70001, ///< WiFi module initialization failed. 243 SSP_ERR_WIFI_TRANSMIT_FAILED = 70002, ///< Transmission failed 244 SSP_ERR_WIFI_INVALID_MODE = 70003, ///< API called when provisioned in client mode 245 SSP_ERR_WIFI_FAILED = 70004, ///< WiFi Failed. 246 SSP_ERR_WIFI_WPS_MULTIPLE_PB_SESSIONS = 70005, ///< Another Push button session is already in progress 247 SSP_ERR_WIFI_WPS_M2D_RECEIVED = 70006, ///< M2D Error code received which means Registrar is unable to authenticate with the Enrollee 248 SSP_ERR_WIFI_WPS_AUTHENTICATION_FAILED = 70007, ///< WPS authentication failed 249 SSP_ERR_WIFI_WPS_CANCELLED = 70008, ///< WPS Request was not accepted by underlying driver 250 SSP_ERR_WIFI_WPS_INVALID_PIN = 70009, ///< Invalid WPS Pin 251 252 /** Start of SF_CELLULAR Specific */ 253 SSP_ERR_CELLULAR_CONFIG_FAILED = 80000, ///< Cellular module Configuration failed. 254 SSP_ERR_CELLULAR_INIT_FAILED = 80001, ///< Cellular module initialization failed. 255 SSP_ERR_CELLULAR_TRANSMIT_FAILED = 80002, ///< Transmission failed 256 SSP_ERR_CELLULAR_FW_UPTODATE = 80003, ///< Firmware is uptodate 257 SSP_ERR_CELLULAR_FW_UPGRADE_FAILED = 80004, ///< Firmware upgrade failed 258 SSP_ERR_CELLULAR_FAILED = 80005, ///< Cellular Failed. 259 SSP_ERR_CELLULAR_INVALID_STATE = 80006, ///< API Called in invalid state. 260 SSP_ERR_CELLULAR_REGISTRATION_FAILED = 80007, ///< Cellular Network registration failed 261 262 /** Start of SF_BLE specific */ 263 SSP_ERR_BLE_FAILED = 90001, ///< BLE operation failed 264 SSP_ERR_BLE_INIT_FAILED = 90002, ///< BLE device initialization failed 265 SSP_ERR_BLE_CONFIG_FAILED = 90003, ///< BLE device configuration failed 266 SSP_ERR_BLE_PRF_ALREADY_ENABLED = 90004, ///< BLE device Profile already enabled 267 SSP_ERR_BLE_PRF_NOT_ENABLED = 90005, ///< BLE device not enabled 268 269 /** Start of Crypto specific (0x10000) @note Refer to sf_cryoto_err.h for Crypto error code. */ 270 SSP_ERR_CRYPTO_CONTINUE = 0x10000, ///< Continue executing function 271 SSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT = 0x10001, ///< Hardware resource busy */ 272 SSP_ERR_CRYPTO_SCE_FAIL = 0x10002, ///< Internal I/O buffer is not empty */ 273 SSP_ERR_CRYPTO_SCE_HRK_INVALID_INDEX = 0x10003, ///< Invalid index */ 274 SSP_ERR_CRYPTO_SCE_RETRY = 0x10004, ///< Retry 275 SSP_ERR_CRYPTO_SCE_VERIFY_FAIL = 0x10005, ///< Verify is failed 276 SSP_ERR_CRYPTO_SCE_ALREADY_OPEN = 0x10006, ///< Crypto Module is already opened 277 SSP_ERR_CRYPTO_NOT_OPEN = 0x10007, ///< Hardware module is not initialized 278 SSP_ERR_CRYPTO_UNKNOWN = 0x10008, ///< Some unknown error occurred */ 279 SSP_ERR_CRYPTO_NULL_POINTER = 0x10009, ///< Null pointer input as a parameter */ 280 SSP_ERR_CRYPTO_NOT_IMPLEMENTED = 0x1000a, ///< Algorithm/size not implemented */ 281 SSP_ERR_CRYPTO_RNG_INVALID_PARAM = 0x1000b, ///< An invalid parameter is specified */ 282 SSP_ERR_CRYPTO_RNG_FATAL_ERROR = 0x1000c, ///< A fatal error occurred */ 283 SSP_ERR_CRYPTO_INVALID_SIZE = 0x1000d, ///< Size specified is invalid */ 284 SSP_ERR_CRYPTO_INVALID_STATE = 0x1000e, ///< Function used in an valid state */ 285 SSP_ERR_CRYPTO_ALREADY_OPEN = 0x1000f, ///< control block is already opened */ 286 SSP_ERR_CRYPTO_INSTALL_KEY_FAILED = 0x10010, ///< Specified input key is invalid. */ 287 SSP_ERR_CRYPTO_AUTHENTICATION_FAILED = 0x10011, ///< Authentication failed */ 288 289 /** Start of SF_CRYPTO specific */ 290 SSP_ERR_CRYPTO_COMMON_NOT_OPENED = 0x20000, ///< Crypto Framework Common is not opened 291 SSP_ERR_CRYPTO_HAL_ERROR = 0x20001, ///< Cryoto HAL module returned an error 292 SSP_ERR_CRYPTO_KEY_BUF_NOT_ENOUGH = 0x20002, ///< Key buffer size is not enough to generate a key 293 SSP_ERR_CRYPTO_BUF_OVERFLOW = 0x20003, ///< Attempt to write data larger than what the buffer can hold 294 SSP_ERR_CRYPTO_INVALID_OPERATION_MODE = 0x20004, ///< Invalid operation mode. 295 SSP_ERR_MESSAGE_TOO_LONG = 0x20005, ///< Message for RSA encryption is too long. 296 SSP_ERR_RSA_DECRYPTION_ERROR = 0x20006, ///< RSA Decryption error. 297 298 /** @note SF_CRYPTO APIs may return an error code starting from 0x10000 which is of Crypto module. 299 * Refer to sf_cryoto_err.h for Crypto error codes. 300 */ 301 302 } ssp_err_t; 303 304 /** ioctl commands. */ 305 typedef enum e_ssp_command 306 { 307 SSP_COMMAND_GET_SECTOR_COUNT =1, ///< Get media sector count. 308 SSP_COMMAND_GET_SECTOR_SIZE =2, ///< Get sector size. 309 SSP_COMMAND_GET_BLOCK_SIZE =3, ///< Get erase block size. 310 SSP_COMMAND_CTRL_ERASE_SECTOR =4, ///< Erase sectors. 311 SSP_COMMAND_GET_WRITE_PROTECTED =5, ///< Get Write Protection status. 312 SSP_COMMAND_SET_BLOCK_SIZE =6, ///< Set block size 313 SSP_COMMAND_GET_SECTOR_RELEASE =7, ///< Get flash sector release information. 314 SSP_COMMAND_CTRL_SECTOR_RELEASE =8, ///< Release sectors. 315 } ssp_command_t; 316 317 318 /** Common version structure */ 319 typedef union st_ssp_version 320 { 321 /** Version id */ 322 uint32_t version_id; 323 /** Code version parameters */ 324 /*LDRA_INSPECTED 381 S Anonymous structures and unions are allowed in SSP code. */ 325 struct 326 { 327 uint8_t code_version_minor; ///< Code minor version 328 uint8_t code_version_major; ///< Code major version 329 uint8_t api_version_minor; ///< API minor version 330 uint8_t api_version_major; ///< API major version 331 }; 332 } ssp_version_t; 333 334 /** @} (end ingroup Common_Error_Codes) */ 335 336 /*********************************************************************************************************************** 337 * Function prototypes 338 **********************************************************************************************************************/ 339 340 #endif /* SSP_COMMON_API_H */ 341