STM32L476G-Discovery board drivers V1.0.0
Dependents: DiscoLogger DISCO_L476VG_GlassLCD DISCO_L476VG_MicrophoneRecorder DISCO_L476VG_UART ... more
MFXSTM32L152_Private_Functions
[MFXSTM32L152_Private_Function_Prototypes]
Functions | |
void | mfxstm32l152_Init (uint16_t DeviceAddr) |
Initialize the mfxstm32l152 and configure the needed hardware resources. | |
void | mfxstm32l152_DeInit (uint16_t DeviceAddr) |
DeInitialize the mfxstm32l152 and unconfigure the needed hardware resources. | |
void | mfxstm32l152_Reset (uint16_t DeviceAddr) |
Reset the mfxstm32l152 by Software. | |
void | mfxstm32l152_LowPower (uint16_t DeviceAddr) |
Put mfxstm32l152 Device in Low Power standby mode. | |
void | mfxstm32l152_WakeUp (uint16_t DeviceAddr) |
WakeUp mfxstm32l152 from standby mode. | |
uint16_t | mfxstm32l152_ReadID (uint16_t DeviceAddr) |
Read the MFXSTM32L152 IO Expander device ID. | |
uint16_t | mfxstm32l152_ReadFwVersion (uint16_t DeviceAddr) |
Read the MFXSTM32L152 device firmware version. | |
void | mfxstm32l152_EnableITSource (uint16_t DeviceAddr, uint8_t Source) |
Enable the interrupt mode for the selected IT source. | |
void | mfxstm32l152_DisableITSource (uint16_t DeviceAddr, uint8_t Source) |
Disable the interrupt mode for the selected IT source. | |
uint8_t | mfxstm32l152_GlobalITStatus (uint16_t DeviceAddr, uint8_t Source) |
Returns the selected Global interrupt source pending bit value. | |
void | mfxstm32l152_ClearGlobalIT (uint16_t DeviceAddr, uint8_t Source) |
Clear the selected Global interrupt pending bit(s) | |
void | mfxstm32l152_SetIrqOutPinPolarity (uint16_t DeviceAddr, uint8_t Polarity) |
Set the global interrupt Polarity of IRQ_OUT_PIN. | |
void | mfxstm32l152_SetIrqOutPinType (uint16_t DeviceAddr, uint8_t Type) |
Set the global interrupt Type of IRQ_OUT_PIN. | |
void | mfxstm32l152_IO_Start (uint16_t DeviceAddr, uint32_t IO_Pin) |
Start the IO functionality used and enable the AF for selected IO pin(s). | |
uint8_t | mfxstm32l152_IO_Config (uint16_t DeviceAddr, uint32_t IO_Pin, IO_ModeTypedef IO_Mode) |
Configures the IO pin(s) according to IO mode structure value. | |
void | mfxstm32l152_IO_InitPin (uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t Direction) |
Initialize the selected IO pin direction. | |
void | mfxstm32l152_IO_SetIrqEvtMode (uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t Evt) |
Set the global interrupt Type. | |
void | mfxstm32l152_IO_SetIrqTypeMode (uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t Type) |
Configure the Edge for which a transition is detectable for the selected pin. | |
void | mfxstm32l152_IO_WritePin (uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t PinState) |
When GPIO is in output mode, puts the corresponding GPO in High (1) or Low (0) level. | |
uint32_t | mfxstm32l152_IO_ReadPin (uint16_t DeviceAddr, uint32_t IO_Pin) |
Return the state of the selected IO pin(s). | |
void | mfxstm32l152_IO_EnableIT (uint16_t DeviceAddr) |
Enable the global IO interrupt source. | |
void | mfxstm32l152_IO_DisableIT (uint16_t DeviceAddr) |
Disable the global IO interrupt source. | |
void | mfxstm32l152_IO_EnablePinIT (uint16_t DeviceAddr, uint32_t IO_Pin) |
Enable interrupt mode for the selected IO pin(s). | |
void | mfxstm32l152_IO_DisablePinIT (uint16_t DeviceAddr, uint32_t IO_Pin) |
Disable interrupt mode for the selected IO pin(s). | |
uint32_t | mfxstm32l152_IO_ITStatus (uint16_t DeviceAddr, uint32_t IO_Pin) |
Check the status of the selected IO interrupt pending bit. | |
void | mfxstm32l152_IO_ClearIT (uint16_t DeviceAddr, uint32_t IO_Pin) |
Clear the selected IO interrupt pending bit(s). | |
void | mfxstm32l152_IO_EnableAF (uint16_t DeviceAddr) |
Enable the AF for aGPIO. | |
void | mfxstm32l152_IO_DisableAF (uint16_t DeviceAddr) |
Disable the AF for aGPIO. | |
void | mfxstm32l152_TS_Start (uint16_t DeviceAddr) |
Configures the touch Screen Controller (Single point detection) | |
uint8_t | mfxstm32l152_TS_DetectTouch (uint16_t DeviceAddr) |
Return if there is touch detected or not. | |
void | mfxstm32l152_TS_GetXY (uint16_t DeviceAddr, uint16_t *X, uint16_t *Y) |
Get the touch screen X and Y positions values. | |
void | mfxstm32l152_TS_EnableIT (uint16_t DeviceAddr) |
Configure the selected source to generate a global interrupt or not. | |
void | mfxstm32l152_TS_DisableIT (uint16_t DeviceAddr) |
Configure the selected source to generate a global interrupt or not. | |
uint8_t | mfxstm32l152_TS_ITStatus (uint16_t DeviceAddr) |
Configure the selected source to generate a global interrupt or not. | |
void | mfxstm32l152_TS_ClearIT (uint16_t DeviceAddr) |
Configure the selected source to generate a global interrupt or not. | |
void | mfxstm32l152_IDD_Start (uint16_t DeviceAddr) |
Launch IDD current measurement. | |
void | mfxstm32l152_IDD_Config (uint16_t DeviceAddr, IDD_ConfigTypeDef MfxIddConfig) |
Configures the IDD current measurement. | |
void | mfxstm32l152_IDD_ConfigShuntNbLimit (uint16_t DeviceAddr, uint8_t ShuntNbLimit) |
This function allows to modify number of shunt used for a measurement. | |
void | mfxstm32l152_IDD_GetValue (uint16_t DeviceAddr, uint32_t *ReadValue) |
Get Idd current value. | |
uint8_t | mfxstm32l152_IDD_GetShuntUsed (uint16_t DeviceAddr) |
Get Last shunt used for measurement. | |
void | mfxstm32l152_IDD_EnableIT (uint16_t DeviceAddr) |
Configure mfx to enable Idd interrupt. | |
void | mfxstm32l152_IDD_ClearIT (uint16_t DeviceAddr) |
Clear Idd global interrupt. | |
uint8_t | mfxstm32l152_IDD_GetITStatus (uint16_t DeviceAddr) |
get Idd interrupt status | |
void | mfxstm32l152_IDD_DisableIT (uint16_t DeviceAddr) |
disable Idd interrupt | |
uint8_t | mfxstm32l152_Error_ReadSrc (uint16_t DeviceAddr) |
Read Error Source. | |
uint8_t | mfxstm32l152_Error_ReadMsg (uint16_t DeviceAddr) |
Read Error Message. | |
void | mfxstm32l152_Error_EnableIT (uint16_t DeviceAddr) |
Enable Error global interrupt. | |
void | mfxstm32l152_Error_ClearIT (uint16_t DeviceAddr) |
Clear Error global interrupt. | |
uint8_t | mfxstm32l152_Error_GetITStatus (uint16_t DeviceAddr) |
get Error interrupt status | |
void | mfxstm32l152_Error_DisableIT (uint16_t DeviceAddr) |
disable Error interrupt | |
uint8_t | mfxstm32l152_ReadReg (uint16_t DeviceAddr, uint8_t RegAddr) |
FOR DEBUG ONLY. | |
static uint8_t | mfxstm32l152_GetInstance (uint16_t DeviceAddr) |
Check if the device instance of the selected address is already registered and return its index. | |
static uint8_t | mfxstm32l152_ReleaseInstance (uint16_t DeviceAddr) |
Release registered device instance. | |
static void | mfxstm32l152_reg24_setPinValue (uint16_t DeviceAddr, uint8_t RegisterAddr, uint32_t PinPosition, uint8_t PinValue) |
Internal routine. |
Function Documentation
void mfxstm32l152_ClearGlobalIT | ( | uint16_t | DeviceAddr, |
uint8_t | Source | ||
) |
Clear the selected Global interrupt pending bit(s)
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Source,: the Global interrupt source to be cleared, could be any combination of the below values. The acknowledge signal for MFXSTM32L152_GPIOs configured in input with interrupt is not on this register but in IRQ_GPI_ACK1, IRQ_GPI_ACK2 registers. - MFXSTM32L152_IRQ_IDD : IDD interrupt
- MFXSTM32L152_IRQ_ERROR : Error interrupt
- MFXSTM32L152_IRQ_TS_DET : Touch Screen Controller Touch Detected interrupt
- MFXSTM32L152_IRQ_TS_NE : Touch Screen FIFO Not Empty
- MFXSTM32L152_IRQ_TS_TH : Touch Screen FIFO threshold triggered
- MFXSTM32L152_IRQ_TS_FULL : Touch Screen FIFO Full
- MFXSTM32L152_IRQ_TS_OVF : Touch Screen FIFO Overflow /\/\ IMPORTANT NOTE /\/\ must not use MFXSTM32L152_IRQ_GPIO as argument, see IRQ_GPI_ACK1 and IRQ_GPI_ACK2 registers
- Return values:
-
None
Definition at line 378 of file mfxstm32l152.c.
void mfxstm32l152_DeInit | ( | uint16_t | DeviceAddr ) |
DeInitialize the mfxstm32l152 and unconfigure the needed hardware resources.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 183 of file mfxstm32l152.c.
void mfxstm32l152_DisableITSource | ( | uint16_t | DeviceAddr, |
uint8_t | Source | ||
) |
Disable the interrupt mode for the selected IT source.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Source,: The interrupt source to be configured, could be: - MFXSTM32L152_IRQ_GPIO: IO interrupt
- MFXSTM32L152_IRQ_IDD : IDD interrupt
- MFXSTM32L152_IRQ_ERROR : Error interrupt
- MFXSTM32L152_IRQ_TS_DET : Touch Screen Controller Touch Detected interrupt
- MFXSTM32L152_IRQ_TS_NE : Touch Screen FIFO Not Empty
- MFXSTM32L152_IRQ_TS_TH : Touch Screen FIFO threshold triggered
- MFXSTM32L152_IRQ_TS_FULL : Touch Screen FIFO Full
- MFXSTM32L152_IRQ_TS_OVF : Touch Screen FIFO Overflow
- Return values:
-
None
Definition at line 327 of file mfxstm32l152.c.
void mfxstm32l152_EnableITSource | ( | uint16_t | DeviceAddr, |
uint8_t | Source | ||
) |
Enable the interrupt mode for the selected IT source.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Source,: The interrupt source to be configured, could be: - MFXSTM32L152_IRQ_GPIO: IO interrupt
- MFXSTM32L152_IRQ_IDD : IDD interrupt
- MFXSTM32L152_IRQ_ERROR : Error interrupt
- MFXSTM32L152_IRQ_TS_DET : Touch Screen Controller Touch Detected interrupt
- MFXSTM32L152_IRQ_TS_NE : Touch Screen FIFO Not Empty
- MFXSTM32L152_IRQ_TS_TH : Touch Screen FIFO threshold triggered
- MFXSTM32L152_IRQ_TS_FULL : Touch Screen FIFO Full
- MFXSTM32L152_IRQ_TS_OVF : Touch Screen FIFO Overflow
- Return values:
-
None
Definition at line 299 of file mfxstm32l152.c.
void mfxstm32l152_Error_ClearIT | ( | uint16_t | DeviceAddr ) |
Clear Error global interrupt.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 1405 of file mfxstm32l152.c.
void mfxstm32l152_Error_DisableIT | ( | uint16_t | DeviceAddr ) |
disable Error interrupt
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None.
Definition at line 1427 of file mfxstm32l152.c.
void mfxstm32l152_Error_EnableIT | ( | uint16_t | DeviceAddr ) |
Enable Error global interrupt.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 1392 of file mfxstm32l152.c.
uint8_t mfxstm32l152_Error_GetITStatus | ( | uint16_t | DeviceAddr ) |
get Error interrupt status
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
Error interrupts status
Definition at line 1416 of file mfxstm32l152.c.
uint8_t mfxstm32l152_Error_ReadMsg | ( | uint16_t | DeviceAddr ) |
Read Error Message.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
Error message code with error source
Definition at line 1380 of file mfxstm32l152.c.
uint8_t mfxstm32l152_Error_ReadSrc | ( | uint16_t | DeviceAddr ) |
Read Error Source.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
Error message code with error source
Definition at line 1369 of file mfxstm32l152.c.
static uint8_t mfxstm32l152_GetInstance | ( | uint16_t | DeviceAddr ) | [static] |
Check if the device instance of the selected address is already registered and return its index.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
Index of the device instance if registered, 0xFF if not.
Definition at line 1457 of file mfxstm32l152.c.
uint8_t mfxstm32l152_GlobalITStatus | ( | uint16_t | DeviceAddr, |
uint8_t | Source | ||
) |
Returns the selected Global interrupt source pending bit value.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Source,: the Global interrupt source to be checked, could be: - MFXSTM32L152_IRQ_GPIO: IO interrupt
- MFXSTM32L152_IRQ_IDD : IDD interrupt
- MFXSTM32L152_IRQ_ERROR : Error interrupt
- MFXSTM32L152_IRQ_TS_DET : Touch Screen Controller Touch Detected interrupt
- MFXSTM32L152_IRQ_TS_NE : Touch Screen FIFO Not Empty
- MFXSTM32L152_IRQ_TS_TH : Touch Screen FIFO threshold triggered
- MFXSTM32L152_IRQ_TS_FULL : Touch Screen FIFO Full
- MFXSTM32L152_IRQ_TS_OVF : Touch Screen FIFO Overflow
- Return values:
-
The value of the checked Global interrupt source status.
Definition at line 356 of file mfxstm32l152.c.
void mfxstm32l152_IDD_ClearIT | ( | uint16_t | DeviceAddr ) |
Clear Idd global interrupt.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 1331 of file mfxstm32l152.c.
void mfxstm32l152_IDD_Config | ( | uint16_t | DeviceAddr, |
IDD_ConfigTypeDef | MfxIddConfig | ||
) |
Configures the IDD current measurement.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. MfxIddConfig,: Parameters depending on hardware config.
- Return values:
-
None
Definition at line 1160 of file mfxstm32l152.c.
void mfxstm32l152_IDD_ConfigShuntNbLimit | ( | uint16_t | DeviceAddr, |
uint8_t | ShuntNbLimit | ||
) |
This function allows to modify number of shunt used for a measurement.
- Parameters:
-
DeviceAddr,: Device address on communication Bus
- Return values:
-
None.
Definition at line 1269 of file mfxstm32l152.c.
void mfxstm32l152_IDD_DisableIT | ( | uint16_t | DeviceAddr ) |
disable Idd interrupt
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None.
Definition at line 1353 of file mfxstm32l152.c.
void mfxstm32l152_IDD_EnableIT | ( | uint16_t | DeviceAddr ) |
Configure mfx to enable Idd interrupt.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 1318 of file mfxstm32l152.c.
uint8_t mfxstm32l152_IDD_GetITStatus | ( | uint16_t | DeviceAddr ) |
get Idd interrupt status
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
IDD interrupts status
Definition at line 1342 of file mfxstm32l152.c.
uint8_t mfxstm32l152_IDD_GetShuntUsed | ( | uint16_t | DeviceAddr ) |
Get Last shunt used for measurement.
- Parameters:
-
DeviceAddr,: Device address on communication Bus
- Return values:
-
Last shunt used
Definition at line 1308 of file mfxstm32l152.c.
void mfxstm32l152_IDD_GetValue | ( | uint16_t | DeviceAddr, |
uint32_t * | ReadValue | ||
) |
Get Idd current value.
- Parameters:
-
DeviceAddr,: Device address on communication Bus ReadValue,: Pointer on value to be read
- Return values:
-
Idd value in 10 nA.
Definition at line 1292 of file mfxstm32l152.c.
void mfxstm32l152_IDD_Start | ( | uint16_t | DeviceAddr ) |
Launch IDD current measurement.
- Parameters:
-
DeviceAddr,: Device address on communication Bus
- Return values:
-
None.
Definition at line 1140 of file mfxstm32l152.c.
void mfxstm32l152_Init | ( | uint16_t | DeviceAddr ) |
Initialize the mfxstm32l152 and configure the needed hardware resources.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 150 of file mfxstm32l152.c.
void mfxstm32l152_IO_ClearIT | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Clear the selected IO interrupt pending bit(s).
It clear automatically also the general MFXSTM32L152_REG_ADR_IRQ_PENDING
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: the IO interrupt to be cleared, could be: - MFXSTM32L152_GPIO_PIN_x: Where x can be from 0 to 23.
- Return values:
-
None
Definition at line 905 of file mfxstm32l152.c.
uint8_t mfxstm32l152_IO_Config | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin, | ||
IO_ModeTypedef | IO_Mode | ||
) |
Configures the IO pin(s) according to IO mode structure value.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The output pin to be set or reset. This parameter can be one of the following values: - MFXSTM32L152_GPIO_PIN_x: where x can be from 0 to 23.
IO_Mode,: The IO pin mode to configure, could be one of the following values: - IO_MODE_INPUT
- IO_MODE_OUTPUT
- IO_MODE_IT_RISING_EDGE
- IO_MODE_IT_FALLING_EDGE
- IO_MODE_IT_LOW_LEVEL
- IO_MODE_IT_HIGH_LEVEL
- IO_MODE_INPUT_PU,
- IO_MODE_INPUT_PD,
- IO_MODE_OUTPUT_OD_PU,
- IO_MODE_OUTPUT_OD_PD,
- IO_MODE_OUTPUT_PP_PU,
- IO_MODE_OUTPUT_PP_PD,
- IO_MODE_IT_RISING_EDGE_PU
- IO_MODE_IT_FALLING_EDGE_PU
- IO_MODE_IT_LOW_LEVEL_PU
- IO_MODE_IT_HIGH_LEVEL_PU
- IO_MODE_IT_RISING_EDGE_PD
- IO_MODE_IT_FALLING_EDGE_PD
- IO_MODE_IT_LOW_LEVEL_PD
- IO_MODE_IT_HIGH_LEVEL_PD
- Return values:
-
None
Definition at line 517 of file mfxstm32l152.c.
void mfxstm32l152_IO_DisableAF | ( | uint16_t | DeviceAddr ) |
Disable the AF for aGPIO.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 963 of file mfxstm32l152.c.
void mfxstm32l152_IO_DisableIT | ( | uint16_t | DeviceAddr ) |
Disable the global IO interrupt source.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 833 of file mfxstm32l152.c.
void mfxstm32l152_IO_DisablePinIT | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Disable interrupt mode for the selected IO pin(s).
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO interrupt to be disabled. This parameter could be any combination of the following values: - MFXSTM32L152_GPIO_PIN_x: where x can be from 0 to 23.
- Return values:
-
None
Definition at line 860 of file mfxstm32l152.c.
void mfxstm32l152_IO_EnableAF | ( | uint16_t | DeviceAddr ) |
Enable the AF for aGPIO.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 937 of file mfxstm32l152.c.
void mfxstm32l152_IO_EnableIT | ( | uint16_t | DeviceAddr ) |
Enable the global IO interrupt source.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 820 of file mfxstm32l152.c.
void mfxstm32l152_IO_EnablePinIT | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Enable interrupt mode for the selected IO pin(s).
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO interrupt to be enabled. This parameter could be any combination of the following values: - MFXSTM32L152_GPIO_PIN_x: where x can be from 0 to 23.
- Return values:
-
None
Definition at line 847 of file mfxstm32l152.c.
void mfxstm32l152_IO_InitPin | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin, | ||
uint8_t | Direction | ||
) |
Initialize the selected IO pin direction.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO pin to be configured. This parameter could be any combination of the following values: - MFXSTM32L152_GPIO_PIN_x: Where x can be from 0 to 23.
Direction,: could be MFXSTM32L152_GPIO_DIR_IN or MFXSTM32L152_GPIO_DIR_OUT.
- Return values:
-
None
Definition at line 719 of file mfxstm32l152.c.
uint32_t mfxstm32l152_IO_ITStatus | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Check the status of the selected IO interrupt pending bit.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO interrupt to be checked could be: - MFXSTM32L152_GPIO_PIN_x Where x can be from 0 to 23.
- Return values:
-
Status of the checked IO pin(s).
Definition at line 873 of file mfxstm32l152.c.
uint32_t mfxstm32l152_IO_ReadPin | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Return the state of the selected IO pin(s).
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The output pin to be set or reset. This parameter can be one of the following values: - MFXSTM32L152_GPIO_PIN_x: where x can be from 0 to 23.
- Return values:
-
IO pin(s) state.
Definition at line 791 of file mfxstm32l152.c.
void mfxstm32l152_IO_SetIrqEvtMode | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin, | ||
uint8_t | Evt | ||
) |
Set the global interrupt Type.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO pin to be configured. This parameter could be any combination of the following values: - MFXSTM32L152_GPIO_PIN_x: Where x can be from 0 to 23.
Evt,: Interrupt line activity type, could be one of the following values: - MFXSTM32L152_IRQ_GPI_EVT_LEVEL: Interrupt line is active in level model
- MFXSTM32L152_IRQ_GPI_EVT_EDGE: Interrupt line is active in edge model
- Return values:
-
None
Definition at line 735 of file mfxstm32l152.c.
void mfxstm32l152_IO_SetIrqTypeMode | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin, | ||
uint8_t | Type | ||
) |
Configure the Edge for which a transition is detectable for the selected pin.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO pin to be configured. This parameter could be any combination of the following values: - MFXSTM32L152_GPIO_PIN_x: Where x can be from 0 to 23.
Evt,: Interrupt line activity type, could be one of the following values: - MFXSTM32L152_IRQ_GPI_TYPE_LLFE: Interrupt line is active in Low Level or Falling Edge
- MFXSTM32L152_IRQ_GPI_TYPE_HLRE: Interrupt line is active in High Level or Rising Edge
- Return values:
-
None
Definition at line 753 of file mfxstm32l152.c.
void mfxstm32l152_IO_Start | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Start the IO functionality used and enable the AF for selected IO pin(s).
- Parameters:
-
DeviceAddr,: Device address on communication Bus. AF_en,: 0 to disable, else enabled.
- Return values:
-
None
Definition at line 454 of file mfxstm32l152.c.
void mfxstm32l152_IO_WritePin | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin, | ||
uint8_t | PinState | ||
) |
When GPIO is in output mode, puts the corresponding GPO in High (1) or Low (0) level.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The output pin to be set or reset. This parameter can be one of the following values: - MFXSTM32L152_GPIO_PIN_x: where x can be from 0 to 23.
PinState,: The new IO pin state.
- Return values:
-
None
Definition at line 768 of file mfxstm32l152.c.
void mfxstm32l152_LowPower | ( | uint16_t | DeviceAddr ) |
Put mfxstm32l152 Device in Low Power standby mode.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 217 of file mfxstm32l152.c.
uint16_t mfxstm32l152_ReadFwVersion | ( | uint16_t | DeviceAddr ) |
Read the MFXSTM32L152 device firmware version.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
The Device FW version (two bytes).
Definition at line 275 of file mfxstm32l152.c.
uint16_t mfxstm32l152_ReadID | ( | uint16_t | DeviceAddr ) |
Read the MFXSTM32L152 IO Expander device ID.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
The Device ID (two bytes).
Definition at line 254 of file mfxstm32l152.c.
uint8_t mfxstm32l152_ReadReg | ( | uint16_t | DeviceAddr, |
uint8_t | RegAddr | ||
) |
FOR DEBUG ONLY.
Definition at line 1436 of file mfxstm32l152.c.
void mfxstm32l152_reg24_setPinValue | ( | uint16_t | DeviceAddr, |
uint8_t | RegisterAddr, | ||
uint32_t | PinPosition, | ||
uint8_t | PinValue | ||
) | [static] |
Internal routine.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. RegisterAddr,: Register Address PinPosition,: Pin [0:23] PinValue,: 0/1
- Return values:
-
None
Definition at line 1502 of file mfxstm32l152.c.
static uint8_t mfxstm32l152_ReleaseInstance | ( | uint16_t | DeviceAddr ) | [static] |
Release registered device instance.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
Index of released device instance, 0xFF if not.
Definition at line 1478 of file mfxstm32l152.c.
void mfxstm32l152_Reset | ( | uint16_t | DeviceAddr ) |
Reset the mfxstm32l152 by Software.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 203 of file mfxstm32l152.c.
void mfxstm32l152_SetIrqOutPinPolarity | ( | uint16_t | DeviceAddr, |
uint8_t | Polarity | ||
) |
Set the global interrupt Polarity of IRQ_OUT_PIN.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Polarity,: the IT mode polarity, could be one of the following values: - MFXSTM32L152_OUT_PIN_POLARITY_LOW: Interrupt output line is active Low edge
- MFXSTM32L152_OUT_PIN_POLARITY_HIGH: Interrupt line output is active High edge
- Return values:
-
None
Definition at line 392 of file mfxstm32l152.c.
void mfxstm32l152_SetIrqOutPinType | ( | uint16_t | DeviceAddr, |
uint8_t | Type | ||
) |
Set the global interrupt Type of IRQ_OUT_PIN.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Type,: Interrupt line activity type, could be one of the following values: - MFXSTM32L152_OUT_PIN_TYPE_OPENDRAIN: Open Drain output Interrupt line
- MFXSTM32L152_OUT_PIN_TYPE_PUSHPULL: Push Pull output Interrupt line
- Return values:
-
None
Definition at line 421 of file mfxstm32l152.c.
void mfxstm32l152_TS_ClearIT | ( | uint16_t | DeviceAddr ) |
Configure the selected source to generate a global interrupt or not.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 1125 of file mfxstm32l152.c.
uint8_t mfxstm32l152_TS_DetectTouch | ( | uint16_t | DeviceAddr ) |
Return if there is touch detected or not.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
Touch detected state.
Definition at line 1045 of file mfxstm32l152.c.
void mfxstm32l152_TS_DisableIT | ( | uint16_t | DeviceAddr ) |
Configure the selected source to generate a global interrupt or not.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 1103 of file mfxstm32l152.c.
void mfxstm32l152_TS_EnableIT | ( | uint16_t | DeviceAddr ) |
Configure the selected source to generate a global interrupt or not.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 1090 of file mfxstm32l152.c.
void mfxstm32l152_TS_GetXY | ( | uint16_t | DeviceAddr, |
uint16_t * | X, | ||
uint16_t * | Y | ||
) |
Get the touch screen X and Y positions values.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. X,: Pointer to X position value Y,: Pointer to Y position value
- Return values:
-
None.
Definition at line 1071 of file mfxstm32l152.c.
uint8_t mfxstm32l152_TS_ITStatus | ( | uint16_t | DeviceAddr ) |
Configure the selected source to generate a global interrupt or not.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
TS interrupts status
Definition at line 1114 of file mfxstm32l152.c.
void mfxstm32l152_TS_Start | ( | uint16_t | DeviceAddr ) |
Configures the touch Screen Controller (Single point detection)
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None.
Definition at line 995 of file mfxstm32l152.c.
void mfxstm32l152_WakeUp | ( | uint16_t | DeviceAddr ) |
WakeUp mfxstm32l152 from standby mode.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 231 of file mfxstm32l152.c.
Generated on Tue Jul 12 2022 18:37:22 by 1.7.2