fome-fw/firmware/hw_layer/pin_repository.h

47 lines
1.1 KiB
C
Raw Normal View History

2014-08-29 07:52:33 -07:00
/**
* @file pin_repository.h
* @brief I/O pin registry header
2014-12-24 16:05:31 -08:00
*
*
*
* @date Jan 15, 2013
2015-01-12 15:04:10 -08:00
* @author Andrey Belomutskiy, (c) 2012-2015
2014-08-29 07:52:33 -07:00
*/
#ifndef PIN_REPOSITORY_H_
#define PIN_REPOSITORY_H_
#include "ch.h"
#include "hal.h"
#include "io_pins.h"
2015-01-07 15:04:40 -08:00
#ifdef __cplusplus
#include "efiGpio.h"
// does not exactly belong here, but that works better for tests
void outputPinRegister(const char *msg, OutputPin *output, GPIO_TypeDef *port, uint32_t pin);
#endif /* __cplusplus */
2014-08-29 07:52:33 -07:00
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
void initPinRepository(void);
2015-01-13 19:04:02 -08:00
const char *hwPortname(brain_pin_e brainPin);
2014-08-29 07:52:33 -07:00
brain_pin_e parseBrainPin(const char *str);
void mySetPadMode(const char *msg, ioportid_t port, ioportmask_t pin, iomode_t mode);
2015-02-01 08:05:10 -08:00
const char * getPinFunction(brain_input_pin_e brainPin);
2014-10-13 11:03:07 -07:00
void mySetPadMode2(const char *msg, brain_pin_e pin, iomode_t mode);
2015-01-13 18:06:35 -08:00
const char *portname(GPIO_TypeDef* GPIOx);
2015-01-03 21:03:23 -08:00
iomode_t getInputMode(pin_input_mode_e mode);
2014-08-29 07:52:33 -07:00
ioportmask_t getHwPin(brain_pin_e brainPin);
GPIO_TypeDef * getHwPort(brain_pin_e brainPin);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* PIN_REPOSITORY_H_ */