forked from santaryan/tm4c-userlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgpio.h
43 lines (36 loc) · 1.32 KB
/
gpio.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* gpio.h
*
* Created on: Feb 22, 2015
* Author: Ryan
*/
#ifndef __GPIO_H__
#define __GPIO_H__
#include <stdbool.h>
#include <stdint.h>
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
extern uint8_t GPIOPinLow(uint32_t ui32Port, uint8_t ui8Pins);
extern uint8_t GPIOPinHigh(uint32_t ui32Port, uint8_t ui8Pins);
extern void GPIOInputInit(uint32_t ui32Port, uint8_t ui8Pins, uint32_t ui32PinType);
extern void GPIOOutputInit(uint32_t ui32Port, uint8_t ui8Pins, uint32_t ui32Strength, uint32_t ui32PinType);
extern void GPIOOutputODInit(uint32_t ui32Port, uint8_t ui8Pins, uint32_t ui32Strength, uint32_t ui32PinType);
extern uint32_t GPIOIntInit(uint32_t ui32Port, uint8_t ui8Pins, uint32_t ui32IntType, int16_t i16Priority, void (*pfnHandler)(void));
extern void GPIOUnlock(uint32_t ui32Port);
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif
#endif /* __GPIO_H__ */