| BlueNRG-1 Peripherals drivers APIs

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

Classes | Macros | Functions
BlueNRG1_mft.h File Reference

This file contains all the functions prototypes for the MFT firmware library. More...

`#include "BlueNRG1.h"`

Go to the source code of this file.

## Classes

struct | MFT_InitType
| Structure definition of MFT initialization. More...

## Macros

#define | IS_MFT(PERIPH) (((PERIPH) == MFT1) || ((PERIPH) == MFT2))
#define | MFT_MODE_1 ((uint8_t)0x00)
#define | MFT_MODE_1a ((uint8_t)0x80)
#define | MFT_MODE_2 ((uint8_t)0x01)
#define | MFT_MODE_3 ((uint8_t)0x02)
#define | MFT_MODE_4 ((uint8_t)0x03)
#define | IS_MFT_MODE(MODE)
#define | MFT_IT_TNA ((uint32_t)0x1)
#define | MFT_IT_TNB ((uint32_t)0x2)
#define | MFT_IT_TNC ((uint32_t)0x4)
#define | MFT_IT_TND ((uint32_t)0x8)
#define | IS_MFT_INTERRUPT(IT) ((((IT) & (~0xF)) == 0x00) && ((IT) != 0x00))
#define | MFT_NO_CLK ((uint8_t)0x00)
#define | MFT_PRESCALED_CLK ((uint8_t)0x01)
#define | MFT_EXTERNAL_EVENT ((uint8_t)0x02)
#define | MFT_PULSE_ACCUMULATE ((uint8_t)0x03)
#define | MFT_LOW_SPEED_CLK ((uint8_t)0x04)
#define | IS_MFT_CLOCK_SEL(MODE)
#define | MFT_FALLING ((uint32_t)0x0) /* on rising edge */
#define | MFT_RISING ((uint32_t)0x1) /* on falling edge */
#define | IS_MFT_Tn_EDGE(REG) (((REG) == MFT_FALLING) || ((REG) == MFT_RISING) )
#define | MFT_TnB_TRIGGER ((uint32_t)0x0) /* trigger on TnB edge */
#define | MFT_SOFTWARE_TRIGGER ((uint32_t)0x1) /* trigger software */
#define | IS_MFT_PULSETRAIN_TRIGGER(MODE) (((MODE) == MFT_TnB_TRIGGER) || ((MODE) == MFT_SOFTWARE_TRIGGER))
#define | MFT_TnA 0 /* select internal pin TnA */
#define | MFT_TnB 1 /* select internal pin TnB */
#define | IS_MFT_TnX(VALUE) (((VALUE) == MFT_TnA) || ((VALUE) == MFT_TnB))
#define | MFT_PWM0_PIN GPIO_Pin_2 /* The PWM0 pin */
#define | MFT_PWM1_PIN GPIO_Pin_3 /* The PWM1 pin */
#define | IS_MFT_PWMX_PIN(VALUE) (((VALUE) == MFT_PWM0_PIN) || ((VALUE) == MFT_PWM1_PIN))
#define | MFT1_TIMERA ((uint32_t)0x0) /* Timer MFT1 and input TnA */
#define | MFT1_TIMERB ((uint32_t)0x1) /* Timer MFT1 and input TnB */
#define | MFT2_TIMERA ((uint32_t)0x2) /* Timer MFT2 and input TnA */
#define | MFT2_TIMERB ((uint32_t)0x3) /* Timer MFT2 and input TnB */
#define | IS_MFT_TIMER(VALUE) ((VALUE) <= 3)
#define | IS_MFT_INPUT_IO(VALUE) ((VALUE) < 15)

## Functions

void | MFT_DeInit (MFT_Type *MFTx)
| DeInit the MFTx peripheral. More...
void | MFT_Init (MFT_Type *MFTx, MFT_InitType *MFT_InitStruct)
| Initializes the MFTx peripheral according to the specified parameters in the MFT_InitStruct. More...
void | MFT_Cmd (MFT_Type *MFTx, FunctionalState NewState)
| Enable/Disable the MFT. More...
void | MFT_StructInit (MFT_InitType *MFT_InitStruct)
| Fills each MFT_InitStruct member with its default value. More...
void | MFT_TnEDGES (MFT_Type *MFTx, uint32_t MFT_TnA_edge, uint32_t MFT_TnB_edge)
| Configure edges sensibility of TnA and TnB. More...
void | MFT_PulseTrainTriggerSelect (MFT_Type *MFTx, uint32_t MFT_Trigger)
| Select trigger source for pulse-train generation in Mode 1a. More...
void | MFT_PulseTrainSoftwareTrigger (MFT_Type *MFTx)
| Pulse-train trigger generation in Mode 1a. More...
void | MFT_TnXEN (MFT_Type *MFTx, uint8_t TnX, FunctionalState NewState)
| Set or Reset TnAEN bit. More...
void | MFT_SelectCapturePin (uint32_t MFT_TimerType, uint8_t MFT_Pin)
| Set or Reset TnAEN bit. More...
void | MFT_SetCounter (MFT_Type *MFTx, uint16_t MFT_Cnt1, uint16_t MFT_Cnt2)
| Set the timer counter. More...
void | MFT_SetCounter1 (MFT_Type *MFTx, uint16_t MFT_Cnt)
| Set the timer counter1. More...
uint16_t | MFT_GetCounter1 (MFT_Type *MFTx)
| Get the timer counter1. More...
void | MFT_SetCounter2 (MFT_Type *MFTx, uint16_t MFT_Cnt)
| Set the timer counter2. More...
uint16_t | MFT_GetCounter2 (MFT_Type *MFTx)
| Get the timer counter2. More...
void | MFT_EnableIT (MFT_Type *MFTx, uint8_t MFT_IrqSource, FunctionalState NewState)
| Enable specific MFT interrupt. More...
void | MFT_ClearIT (MFT_Type *MFTx, uint8_t MFT_IrqSource)
| Clear specific MFT interrupt. More...
ITStatus | MFT_StatusIT (MFT_Type *MFTx, uint8_t MFT_IrqSource)
| Return interrupt status. More...

## Detailed Description

This file contains all the functions prototypes for the MFT firmware library.

Author
  VMA Application Team

Version
  V2.0.0

Date
  21-March-2016

Attention

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

##
© COPYRIGHT 2016 STMicroelectronics

Definition in file BlueNRG1_mft.h.