2337 views|0 replies

3836

Posts

19

Resources
The OP
 

MSP432 learning notes: GPIO usage and configuration [Copy link]

There are the following library functions among the officially provided library functions. Let us answer them one by one.

I think GPIO functions are mainly divided into two categories: one is GPIO interrupt configuration function

The following parameter settings are similar. The options for selectedPort are
GPIO_PORT_P1
GPIO_PORT_P2
GPIO_PORT_PA
and the options for selectedPins are
GPIO_PIN0
GPIO_PIN1
GPIO_PIN2
GPIO_PIN3
GPIO_PIN4
GPIO_PIN5
GPIO_PIN6
GPIO_PIN7
GPIO_PIN8
GPIO_PIN9
GPIO_PIN10
GPIO_PIN11
GPIO_PIN12
GPIO_PIN13
GPIO_PIN14
GPIO_PIN15
//GPIO interrupt flag clear
void GPIO_clearInterruptFlag (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
//GPIO edge trigger mode, edgeSelect has the following options: GPIO_HIGH_TO_LOW_TRANSITION (falling edge trigger)
GPIO_LOW_TO_HIGH_TRANSITION (rising edge trigger)
void GPIO_interruptEdgeSelect (uint_fast8_t selectedPort, uint_fast16_t selectedPins,
uint_fast8_t edgeSelect)
//GPIO interrupt enable disable
void GPIO_disableInterrupt (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
//GPIO interrupt enable
void GPIO_enableInterrupt (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
//GPIO gets the interrupt enable flag and returns an (unsigned int) data
uint_fast16_t GPIO_getEnabledInterruptStatus (uint_fast8_t selectedPort)
//GPIO gets the IO interrupt flag and returns an (unsigned int) data
uint_fast16_t GPIO_getInterruptStatus (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
void GPIO_registerInterrupt (uint_fast8_t selectedPort, void(intHandler)(void))

//The second category is the ordinary GPIO port configuration function

void GPIO_setAsInputPinWith PullUpResistor (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
void GPIO_setAsOutputPin (uint_fast8_t selectedPort
, uint_fast16_t selectedPins) void
GPIO_setAsPeripheralModuleFunctionInputPin
( uint_fast8_t selectedPort , uint_fast16_t selectedPins, uint_fast8_t mode) void GPIO_setAsPeripheralModuleFunctionOutputPin (uint_fast8_t selectedPort, uint_fast16_t selectedPins, uint_fast8_t mode) void GPIO_setDriveStrengthHigh (uint_fast8_t selectedPort, uint_fast8_t selectedPins) void GPIO_setDriveStrengthLow (uint_fast8_t selectedPort, uint_fast8_t selectedPins) void GPIO_setOutput HighOnPin (uint_fast8_t selectedPort, uint_fast16_t selectedPins) void GPIO_setOutputLowOnPin (uint_fast8_t selectedPort, uint_fast16_t selectedPins) void GPIO_toggleOutputOnPin ( uint_fast8_t selectedPort, uint_fast16_t selectedPins) void GPIO_unregisterInterrupt (uint_fast8_t selectedPort)












This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list