stm32f769i_discovery_eeprom.h
Go to the documentation of this file.
1 
37 /* Define to prevent recursive inclusion -------------------------------------*/
38 #ifndef __STM32F769I_DISCOVERY_EEPROM_H
39 #define __STM32F769I_DISCOVERY_EEPROM_H
40 
41 #ifdef __cplusplus
42  extern "C" {
43 #endif
44 
45 /* Includes ------------------------------------------------------------------*/
46 #include "stm32f769i_discovery.h"
47 
71 /* EEPROM hardware address and page size */
72 #define EEPROM_PAGESIZE ((uint8_t)4)
73 #define EEPROM_MAX_SIZE ((uint16_t)0x2000) /* 64Kbit */
74 
75 
76 /* Maximum number of trials for EEPROM_WaitEepromStandbyState() function */
77 #define EEPROM_MAX_TRIALS ((uint32_t)3000)
78 
79 #define EEPROM_OK ((uint32_t)0)
80 #define EEPROM_FAIL ((uint32_t)1)
81 #define EEPROM_TIMEOUT ((uint32_t)2)
82 
96 uint32_t BSP_EEPROM_Init(void);
97 uint8_t BSP_EEPROM_DeInit(void);
98 uint32_t BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead);
99 uint32_t BSP_EEPROM_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite);
100 uint32_t BSP_EEPROM_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite);
101 uint32_t BSP_EEPROM_WaitEepromStandbyState(void);
102 
103 /* USER Callbacks: This function is declared as __weak in EEPROM driver and
104  should be implemented into user application.
105  BSP_EEPROM_TIMEOUT_UserCallback() function is called whenever a timeout condition
106  occurs during communication (waiting on an event that doesn't occur, bus
107  errors, busy devices ...). */
109 
110 /* Link function for I2C EEPROM peripheral */
111 void EEPROM_IO_Init(void);
112 HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize);
113 HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize);
114 HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
115 
132 #ifdef __cplusplus
133 }
134 #endif
135 
136 #endif /* __STM32F769I_DISCOVERY_EEPROM_H */
137 
138 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
EEPROM_IO_IsDeviceReady
HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials)
Checks if target device is ready for communication.
Definition: stm32469i_discovery.c:831
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
BSP_EEPROM_WriteBuffer
uint32_t BSP_EEPROM_WriteBuffer(uint8_t *pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite)
Writes buffer of data to the I2C EEPROM.
Definition: stm32f769i_discovery_eeprom.c:283
stm32f769i_discovery.h
This file contains definitions for STM32F769I-Discovery LEDs, push-buttons hardware resources.
BSP_EEPROM_WaitEepromStandbyState
uint32_t BSP_EEPROM_WaitEepromStandbyState(void)
Wait for EEPROM Standby state.
Definition: stm32f769i_discovery_eeprom.c:440
BSP_EEPROM_DeInit
uint8_t BSP_EEPROM_DeInit(void)
DeInitializes the EEPROM.
Definition: stm32f769i_discovery_eeprom.c:180
BSP_EEPROM_ReadBuffer
uint32_t BSP_EEPROM_ReadBuffer(uint8_t *pBuffer, uint16_t ReadAddr, uint16_t *NumByteToRead)
Reads a block of data from the EEPROM.
Definition: stm32f769i_discovery_eeprom.c:201
BSP_EEPROM_WritePage
uint32_t BSP_EEPROM_WritePage(uint8_t *pBuffer, uint16_t WriteAddr, uint8_t *NumByteToWrite)
Writes more than one byte to the EEPROM with a single WRITE cycle.
Definition: stm32f769i_discovery_eeprom.c:248
BSP_EEPROM_TIMEOUT_UserCallback
void BSP_EEPROM_TIMEOUT_UserCallback(void)
Basic management of the timeout situation.
Definition: stm32f769i_discovery_eeprom.c:456
BSP_EEPROM_Init
uint32_t BSP_EEPROM_Init(void)
Initializes peripherals used by the I2C EEPROM driver.
Definition: stm32f769i_discovery_eeprom.c:157
EEPROM_IO_WriteData
HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize)
Write data to I2C EEPROM driver in using DMA channel.
Definition: stm32469i_discovery.c:806
EEPROM_IO_ReadData
HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize)
Read data from I2C EEPROM driver in using DMA channel.
Definition: stm32469i_discovery.c:819
EEPROM_IO_Init
void EEPROM_IO_Init(void)
Initializes peripherals used by the I2C EEPROM driver.
Definition: stm32469i_discovery.c:793


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:53