![]() |
STM32F769IDiscovery
1.00
uDANTE Audio Networking with STM32F7 DISCO board
|
This file provides a set of functions needed to manage the MFXSTM32L152 IO Expander devices. More...
#include "mfxstm32l152.h"
Go to the source code of this file.
Macros | |
#define | MFXSTM32L152_MAX_INSTANCE 3 |
Functions | |
void | mfxstm32l152_Init (uint16_t DeviceAddr) |
Initialize the mfxstm32l152 and configure the needed hardware resources. More... | |
void | mfxstm32l152_DeInit (uint16_t DeviceAddr) |
DeInitialize the mfxstm32l152 and unconfigure the needed hardware resources. More... | |
void | mfxstm32l152_Reset (uint16_t DeviceAddr) |
Reset the mfxstm32l152 by Software. More... | |
void | mfxstm32l152_LowPower (uint16_t DeviceAddr) |
Put mfxstm32l152 Device in Low Power standby mode. More... | |
void | mfxstm32l152_WakeUp (uint16_t DeviceAddr) |
WakeUp mfxstm32l152 from standby mode. More... | |
uint16_t | mfxstm32l152_ReadID (uint16_t DeviceAddr) |
Read the MFXSTM32L152 IO Expander device ID. More... | |
uint16_t | mfxstm32l152_ReadFwVersion (uint16_t DeviceAddr) |
Read the MFXSTM32L152 device firmware version. More... | |
void | mfxstm32l152_EnableITSource (uint16_t DeviceAddr, uint8_t Source) |
Enable the interrupt mode for the selected IT source. More... | |
void | mfxstm32l152_DisableITSource (uint16_t DeviceAddr, uint8_t Source) |
Disable the interrupt mode for the selected IT source. More... | |
uint8_t | mfxstm32l152_GlobalITStatus (uint16_t DeviceAddr, uint8_t Source) |
Returns the selected Global interrupt source pending bit value. More... | |
void | mfxstm32l152_ClearGlobalIT (uint16_t DeviceAddr, uint8_t Source) |
Clear the selected Global interrupt pending bit(s) More... | |
void | mfxstm32l152_SetIrqOutPinPolarity (uint16_t DeviceAddr, uint8_t Polarity) |
Set the global interrupt Polarity of IRQ_OUT_PIN. More... | |
void | mfxstm32l152_SetIrqOutPinType (uint16_t DeviceAddr, uint8_t Type) |
Set the global interrupt Type of IRQ_OUT_PIN. More... | |
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). More... | |
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. More... | |
void | mfxstm32l152_IO_InitPin (uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t Direction) |
Initialize the selected IO pin direction. More... | |
void | mfxstm32l152_IO_SetIrqEvtMode (uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t Evt) |
Set the global interrupt Type. More... | |
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. More... | |
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. More... | |
uint32_t | mfxstm32l152_IO_ReadPin (uint16_t DeviceAddr, uint32_t IO_Pin) |
Return the state of the selected IO pin(s). More... | |
void | mfxstm32l152_IO_EnableIT (uint16_t DeviceAddr) |
Enable the global IO interrupt source. More... | |
void | mfxstm32l152_IO_DisableIT (uint16_t DeviceAddr) |
Disable the global IO interrupt source. More... | |
void | mfxstm32l152_IO_EnablePinIT (uint16_t DeviceAddr, uint32_t IO_Pin) |
Enable interrupt mode for the selected IO pin(s). More... | |
void | mfxstm32l152_IO_DisablePinIT (uint16_t DeviceAddr, uint32_t IO_Pin) |
Disable interrupt mode for the selected IO pin(s). More... | |
uint32_t | mfxstm32l152_IO_ITStatus (uint16_t DeviceAddr, uint32_t IO_Pin) |
Check the status of the selected IO interrupt pending bit. More... | |
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. More... | |
void | mfxstm32l152_IO_EnableAF (uint16_t DeviceAddr) |
Enable the AF for aGPIO. More... | |
void | mfxstm32l152_IO_DisableAF (uint16_t DeviceAddr) |
Disable the AF for aGPIO. More... | |
void | mfxstm32l152_TS_Start (uint16_t DeviceAddr) |
Configures the touch Screen Controller (Single point detection) More... | |
uint8_t | mfxstm32l152_TS_DetectTouch (uint16_t DeviceAddr) |
Return if there is touch detected or not. More... | |
void | mfxstm32l152_TS_GetXY (uint16_t DeviceAddr, uint16_t *X, uint16_t *Y) |
Get the touch screen X and Y positions values. More... | |
void | mfxstm32l152_TS_EnableIT (uint16_t DeviceAddr) |
Configure the selected source to generate a global interrupt or not. More... | |
void | mfxstm32l152_TS_DisableIT (uint16_t DeviceAddr) |
Configure the selected source to generate a global interrupt or not. More... | |
uint8_t | mfxstm32l152_TS_ITStatus (uint16_t DeviceAddr) |
Configure the selected source to generate a global interrupt or not. More... | |
void | mfxstm32l152_TS_ClearIT (uint16_t DeviceAddr) |
Configure the selected source to generate a global interrupt or not. More... | |
void | mfxstm32l152_IDD_Start (uint16_t DeviceAddr) |
Launch IDD current measurement. More... | |
void | mfxstm32l152_IDD_Config (uint16_t DeviceAddr, IDD_ConfigTypeDef MfxIddConfig) |
Configures the IDD current measurement. More... | |
void | mfxstm32l152_IDD_ConfigShuntNbLimit (uint16_t DeviceAddr, uint8_t ShuntNbLimit) |
This function allows to modify number of shunt used for a measurement. More... | |
void | mfxstm32l152_IDD_GetValue (uint16_t DeviceAddr, uint32_t *ReadValue) |
Get Idd current value. More... | |
uint8_t | mfxstm32l152_IDD_GetShuntUsed (uint16_t DeviceAddr) |
Get Last shunt used for measurement. More... | |
void | mfxstm32l152_IDD_EnableIT (uint16_t DeviceAddr) |
Configure mfx to enable Idd interrupt. More... | |
void | mfxstm32l152_IDD_ClearIT (uint16_t DeviceAddr) |
Clear Idd global interrupt. More... | |
uint8_t | mfxstm32l152_IDD_GetITStatus (uint16_t DeviceAddr) |
get Idd interrupt status More... | |
void | mfxstm32l152_IDD_DisableIT (uint16_t DeviceAddr) |
disable Idd interrupt More... | |
uint8_t | mfxstm32l152_Error_ReadSrc (uint16_t DeviceAddr) |
Read Error Source. More... | |
uint8_t | mfxstm32l152_Error_ReadMsg (uint16_t DeviceAddr) |
Read Error Message. More... | |
void | mfxstm32l152_Error_EnableIT (uint16_t DeviceAddr) |
Enable Error global interrupt. More... | |
void | mfxstm32l152_Error_ClearIT (uint16_t DeviceAddr) |
Clear Error global interrupt. More... | |
uint8_t | mfxstm32l152_Error_GetITStatus (uint16_t DeviceAddr) |
get Error interrupt status More... | |
void | mfxstm32l152_Error_DisableIT (uint16_t DeviceAddr) |
disable Error interrupt More... | |
uint8_t | mfxstm32l152_ReadReg (uint16_t DeviceAddr, uint8_t RegAddr) |
FOR DEBUG ONLY. More... | |
void | mfxstm32l152_WriteReg (uint16_t DeviceAddr, uint8_t RegAddr, uint8_t Value) |
Variables | |
TS_DrvTypeDef | mfxstm32l152_ts_drv |
IO_DrvTypeDef | mfxstm32l152_io_drv |
IDD_DrvTypeDef | mfxstm32l152_idd_drv |
uint8_t | mfxstm32l152 [MFXSTM32L152_MAX_INSTANCE] = {0} |
This file provides a set of functions needed to manage the MFXSTM32L152 IO Expander devices.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file mfxstm32l152.c.