| BlueNRG-1 Peripherals drivers APIs

- Main Page
- Modules
- Classes
- Files

Functions
Exported Functions
BLUENRG1 Peripheral Driver » MFT Peripheral

## 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

## Function Documentation

void MFT_ClearIT | ( | MFT_Type * | MFTx,
|  | uint8_t | MFT_IrqSource
| ) |  |

Clear specific MFT interrupt.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  MFT_IrqSource | interrupt source to enable, this value can be
  - MFT_IT_TNA Select the interrupt source A
  - MFT_IT_TNB Select the interrupt source B
  - MFT_IT_TNC Select the interrupt source C
  - MFT_IT_TND Select the interrupt source D

Return values

  None |

Definition at line 399 of file BlueNRG1_mft.c.

void MFT_Cmd | ( | MFT_Type * | MFTx,
|  | FunctionalState | NewState
| ) |  |

Enable/Disable the MFT.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  NewState | functional state FunctionalState This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 160 of file BlueNRG1_mft.c.

void MFT_DeInit | ( | MFT_Type * | MFTx | ) |

DeInit the MFTx peripheral.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type

Return values

  None |

Definition at line 84 of file BlueNRG1_mft.c.

void MFT_EnableIT | ( | MFT_Type * | MFTx,
|  | uint8_t | MFT_IrqSource,
|  | FunctionalState | NewState
| ) |  |

Enable specific MFT interrupt.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  MFT_IrqSource | interrupt source to enable, this value can be
  - MFT_IT_TNA Select the interrupt source A
  - MFT_IT_TNB Select the interrupt source B
  - MFT_IT_TNC Select the interrupt source C
  - MFT_IT_TND Select the interrupt source D
  NewState | functional state FunctionalState This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 374 of file BlueNRG1_mft.c.

uint16_t MFT_GetCounter1 | ( | MFT_Type * | MFTx | ) |

Get the timer counter1.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  None |

Return values

  uint16_t | the counter 1 value

Definition at line 323 of file BlueNRG1_mft.c.

uint16_t MFT_GetCounter2 | ( | MFT_Type * | MFTx | ) |

Get the timer counter2.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  None |

Return values

  uint16_t | the counter 2 value

Definition at line 353 of file BlueNRG1_mft.c.

void MFT_Init | ( | MFT_Type * | MFTx,
|  | MFT_InitType * | MFT_InitStruct
| ) |  |

Initializes the MFTx peripheral according to the specified parameters in the MFT_InitStruct.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  MFT_InitStruct | pointer to a MFT_InitType structure that contains the configuration information for the specified MFT peripheral.

Return values

  None |

Definition at line 102 of file BlueNRG1_mft.c.

void MFT_PulseTrainSoftwareTrigger | ( | MFT_Type * | MFTx | ) |

Pulse-train trigger generation in Mode 1a.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type

Return values

  None |

Definition at line 217 of file BlueNRG1_mft.c.

void MFT_PulseTrainTriggerSelect | ( | MFT_Type * | MFTx,
|  | uint32_t | MFT_Trigger
| ) |  |

Select trigger source for pulse-train generation in Mode 1a.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  MFT_Trigger | : software or TnB trigger, this value can be
  - MFT_TnB_TRIGGER trigger on TnB edge
  - MFT_SOFTWARE_TRIGGER trigger software

Return values

  None |

Definition at line 203 of file BlueNRG1_mft.c.

void MFT_SelectCapturePin | ( | uint32_t | MFT_TimerType,
|  | uint8_t | MFT_Pin
| ) |  |

Set or Reset TnAEN bit.

Parameters

  MFT_TimerType | : select the timer and the pin, this value can be
  - MFT1_TIMERA Select Timer MFT1 and input TnA
  - MFT1_TIMERB Select Timer MFT1 and input TnB
  - MFT2_TIMERA Select Timer MFT2 and input TnA
  - MFT2_TIMERB Select Timer MFT2 and input TnB
  MFT_Pin | : the IO number from IO0 to IO14 (0, 1, .. 14)

Return values

  None |

Definition at line 261 of file BlueNRG1_mft.c.

void MFT_SetCounter | ( | MFT_Type * | MFTx,
|  | uint16_t | MFT_Cnt1,
|  | uint16_t | MFT_Cnt2
| ) |  |

Set the timer counter.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  MFT_Cnt1 | : set the counter value for CNT1
  MFT_Cnt2 | : set the counter value for CNT2

Return values

  None |

Definition at line 291 of file BlueNRG1_mft.c.

void MFT_SetCounter1 | ( | MFT_Type * | MFTx,
|  | uint16_t | MFT_Cnt
| ) |  |

Set the timer counter1.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  MFT_Cnt | : set the counter value for CNT1

Return values

  None |

Definition at line 308 of file BlueNRG1_mft.c.

void MFT_SetCounter2 | ( | MFT_Type * | MFTx,
|  | uint16_t | MFT_Cnt
| ) |  |

Set the timer counter2.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  MFT_Cnt | : set the counter value for CNT2

Return values

  None |

Definition at line 338 of file BlueNRG1_mft.c.

ITStatus MFT_StatusIT | ( | MFT_Type * | MFTx,
|  | uint8_t | MFT_IrqSource
| ) |  |

Return interrupt status.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  MFT_IrqSource | interrupt source to enable, this value can be
  - MFT_IT_TNA Select the interrupt source A
  - MFT_IT_TNB Select the interrupt source B
  - MFT_IT_TNC Select the interrupt source C
  - MFT_IT_TND Select the interrupt source D

Return values

  ITStatus | functional state ITStatus This parameter can be: SET or RESET.

Definition at line 419 of file BlueNRG1_mft.c.

void MFT_StructInit | ( | MFT_InitType * | MFT_InitStruct | ) |

Fills each MFT_InitStruct member with its default value.

Parameters

  MFT_InitStruct | : pointer to a MFT_InitType structure which will be initialized.

Return values

  None |

Definition at line 142 of file BlueNRG1_mft.c.

void MFT_TnEDGES | ( | MFT_Type * | MFTx,
|  | uint32_t | MFT_TnA_edge,
|  | uint32_t | MFT_TnB_edge
| ) |  |

Configure edges sensibility of TnA and TnB.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  MFT_TnA_edge | : falling or rising edge
  MFT_TnB_edge | : falling or rising edge, these values can be
  - MFT_FALLING on rising edge
  - MFT_RISING on falling edge

Return values

  None |

Definition at line 184 of file BlueNRG1_mft.c.

void MFT_TnXEN | ( | MFT_Type * | MFTx,
|  | uint8_t | TnX,
|  | FunctionalState | NewState
| ) |  |

Set or Reset TnAEN bit.

Parameters

  MFTx | where x can be 1 or 2 to select the MFT peripheral MFT_Type
  TnX | : set or reset, MFT_TnAEN
  - MFT_TnA select internal pin TnA
  - MFT_TnB select internal pin TnB
  NewState | functional state FunctionalState This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 235 of file BlueNRG1_mft.c.