STM32L476G-Discovery board drivers V1.0.0
Dependents: DiscoLogger DISCO_L476VG_GlassLCD DISCO_L476VG_MicrophoneRecorder DISCO_L476VG_UART ... more
mfxstm32l152.c File Reference
This file provides a set of functions needed to manage the MFXSTM32L152 IO Expander devices. More...
Go to the source code of this file.
Functions | |
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. | |
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. |
Detailed Description
This file provides a set of functions needed to manage the MFXSTM32L152 IO Expander devices.
- Attention:
© Copyright (c) 2015 STMicroelectronics. All rights reserved.
This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause
Definition in file mfxstm32l152.c.
Generated on Tue Jul 12 2022 18:37:22 by 1.7.2