Lines Matching refs:address
133 static inline bool _cyhal_flash_is_flash_address(uint32_t address) in _cyhal_flash_is_flash_address() argument
137 ((CY_EM_EEPROM_BASE <= address) && (address < (CY_EM_EEPROM_BASE + CY_EM_EEPROM_SIZE))) || in _cyhal_flash_is_flash_address()
141 ((CY_FLASH_BASE <= address) && (address < (CY_FLASH_BASE + CY_FLASH_SIZE))); in _cyhal_flash_is_flash_address()
143 (address < (CY_FLASH_BASE + CY_FLASH_SIZE)); in _cyhal_flash_is_flash_address()
146 static inline bool _cyhal_flash_is_sram_address(uint32_t address) in _cyhal_flash_is_sram_address() argument
148 return ((CY_SRAM_BASE <= address) && (address < (CY_SRAM_BASE + CY_SRAM_SIZE))); in _cyhal_flash_is_sram_address()
152 _cyhal_flash_operation operation, uint32_t address, const uint32_t* data, bool clearCache) in _cyhal_flash_run_operation() argument
160 ? (cy_rslt_t)_cyhal_flash_convert_status((cy_rslt_t)operation(address, data)) in _cyhal_flash_run_operation()
210 cy_rslt_t cyhal_flash_read(cyhal_flash_t *obj, uint32_t address, uint8_t *data, size_t size) in cyhal_flash_read() argument
215 … if (!_cyhal_flash_is_flash_address(address) || !_cyhal_flash_is_flash_address(address + size - 1)) in cyhal_flash_read()
219 memcpy(data, (void *)address, size); in cyhal_flash_read()
223 cy_rslt_t cyhal_flash_erase(cyhal_flash_t *obj, uint32_t address) in cyhal_flash_erase() argument
232 else if (_cyhal_flash_is_flash_address(address)) in cyhal_flash_erase()
234 status = (cy_rslt_t)_cyhal_flash_convert_status(Cy_Flash_EraseRow(address)); in cyhal_flash_erase()
239 CY_UNUSED_PARAMETER(address); in cyhal_flash_erase()
244 cy_rslt_t cyhal_flash_write(cyhal_flash_t *obj, uint32_t address, const uint32_t* data) in cyhal_flash_write() argument
249 cy_rslt_t status = _cyhal_flash_is_flash_address(address) in cyhal_flash_write()
250 ? _cyhal_flash_run_operation(Cy_Flash_WriteRow, address, data, true) in cyhal_flash_write()
256 cy_rslt_t cyhal_flash_program(cyhal_flash_t *obj, uint32_t address, const uint32_t *data) in cyhal_flash_program() argument
262 return _cyhal_flash_is_flash_address(address) in cyhal_flash_program()
263 ? _cyhal_flash_run_operation(Cy_Flash_ProgramRow, address, data, true) in cyhal_flash_program()
266 CY_UNUSED_PARAMETER(address); in cyhal_flash_program()
272 cy_rslt_t cyhal_flash_start_erase(cyhal_flash_t *obj, uint32_t address) in cyhal_flash_start_erase() argument
285 status = (cy_rslt_t)_cyhal_flash_convert_status(_cyhal_flash_is_flash_address(address) in cyhal_flash_start_erase()
286 ? Cy_Flash_StartEraseRow(address) in cyhal_flash_start_erase()
291 CY_UNUSED_PARAMETER(address); in cyhal_flash_start_erase()
296 cy_rslt_t cyhal_flash_start_write(cyhal_flash_t *obj, uint32_t address, const uint32_t* data) in cyhal_flash_start_write() argument
302 return _cyhal_flash_is_flash_address(address) in cyhal_flash_start_write()
303 ? _cyhal_flash_run_operation(Cy_Flash_StartWrite, address, data, false) in cyhal_flash_start_write()
306 CY_UNUSED_PARAMETER(address); in cyhal_flash_start_write()
312 cy_rslt_t cyhal_flash_start_program(cyhal_flash_t *obj, uint32_t address, const uint32_t* data) in cyhal_flash_start_program() argument
318 return _cyhal_flash_is_flash_address(address) in cyhal_flash_start_program()
319 ? _cyhal_flash_run_operation(Cy_Flash_StartProgram, address, data, false) in cyhal_flash_start_program()
322 CY_UNUSED_PARAMETER(address); in cyhal_flash_start_program()