29 lines
1.5 KiB
C
29 lines
1.5 KiB
C
/*==============================================================================
|
||
* Инициализация портов с использованием бибилотеки PLIB035
|
||
*------------------------------------------------------------------------------
|
||
* ЦНИИ СЭТ, Разваляев Алексей <wot890089@mail.ru>
|
||
*==============================================================================
|
||
* Реализация функций инициализации портов находится в gpio.c
|
||
* ЦНИИ СЭТ
|
||
*==============================================================================
|
||
*/
|
||
#ifndef __GPIO_H
|
||
#define __GPIO_H
|
||
//-- Includes ------------------------------------------------------------------
|
||
#include "plib035.h"
|
||
#include "retarget_conf.h"
|
||
|
||
//-- Defines -------------------------------------------------------------------
|
||
// Дефайны для режима пина OutEnable, AltFuncEnable, DigitalEnable
|
||
#define GPIO_PinMode_Unused DISABLE, DISABLE, DISABLE
|
||
#define GPIO_PinMode_Input DISABLE, DISABLE, ENABLE
|
||
#define GPIO_PinMode_Output ENABLE, DISABLE, ENABLE
|
||
#define GPIO_PinMode_AltFunc DISABLE, ENABLE, ENABLE
|
||
//#define GPIO_PinMode_Analog DISABLE, DISABLE, DISABLE
|
||
|
||
//-- Exported functions prototypes ---------------------------------------------
|
||
void gpio_init(void);
|
||
GPIO_Init_TypeDef *gpio_get_init(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin);
|
||
|
||
#endif /*__GPIO_H*/
|