ACDC Senior Project v1.0.0
Senior Project for Textron Aviation
Loading...
Searching...
No Matches
ACDC_INTERRUPT.h File Reference

Contains interrupt functions for hardware peripherals. More...

#include "stm32f1xx.h"
#include "ACDC_stdint.h"

Go to the source code of this file.

Enumerations

enum  GPIO_TriggerType { TT_RISING_EDGE = 0b01 , TT_FALLING_EDGE = 0b10 , TT_RISING_AND_FALLING_EDGE = 0b11 }
 

Functions

void INTERRUPT_Enable (IRQn_Type IRQn)
 Enables Interrupts for the specific vector IRQn.
 
void INTERRUPT_Disable (IRQn_Type IRQn)
 Disables Interrupts for the specific vector IRQn.
 
void INTERRUPT_SetPriority (IRQn_Type IRQn, uint8_t Priority)
 Sets the priority of the Interrupt vector IRQn.
 
void GPIO_INT_SetToInterrupt (const GPIO_TypeDef *GPIOx, uint16_t GPIO_PIN, GPIO_TriggerType TT_x)
 Enables Interrupts for GPIO_PIN on GPIOx. (Make sure to set GPIO_PIN as an Input)
 

Detailed Description

Contains interrupt functions for hardware peripherals.

Author
Devin Marx
Version
0.1
Date
2023-11-02

Enumeration Type Documentation

◆ GPIO_TriggerType

Enumerator
TT_RISING_EDGE 

Interrupt Occurs on Rising Edge

TT_FALLING_EDGE 

Interrupt Occurs on Falling Edge

TT_RISING_AND_FALLING_EDGE 

Interrupt Occurs on both the Rising and Falling Edges

Function Documentation

◆ GPIO_INT_SetToInterrupt()

void GPIO_INT_SetToInterrupt ( const GPIO_TypeDef * GPIOx,
uint16_t GPIO_PIN,
GPIO_TriggerType TT_x )

Enables Interrupts for GPIO_PIN on GPIOx. (Make sure to set GPIO_PIN as an Input)

Parameters
GPIOxPort of the GPIO (Ex. GPIOA, GPIOB, ...)
GPIO_PINDesired pin on port GPIOx (Ex. GPIO_PIN_0, GPIO_PIN_1, ...)
triggerTypeEdge that triggers the Interrupt (Ex. RISING_EDGE, FALLING_EDGE, RISING_AND_FALLING_EDGE)

◆ INTERRUPT_Disable()

void INTERRUPT_Disable ( IRQn_Type IRQn)

Disables Interrupts for the specific vector IRQn.

Parameters
IRQnInterrupt vector to disable

◆ INTERRUPT_Enable()

void INTERRUPT_Enable ( IRQn_Type IRQn)

Enables Interrupts for the specific vector IRQn.

Parameters
IRQnInterrupt vector to enable

◆ INTERRUPT_SetPriority()

void INTERRUPT_SetPriority ( IRQn_Type IRQn,
uint8_t Priority )

Sets the priority of the Interrupt vector IRQn.

Parameters
IRQnInterrupt vector
PriorityPriority of the IRQn vector (Value: 0-15 Lower value means higher priority)