2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file pin_repository.h
|
|
|
|
* @brief I/O pin registry header
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @date Jan 15, 2013
|
2017-01-03 03:05:22 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2017
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PIN_REPOSITORY_H_
|
|
|
|
#define PIN_REPOSITORY_H_
|
|
|
|
|
2018-11-03 10:17:58 -07:00
|
|
|
#include "global.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
#include "io_pins.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#include "efiGpio.h"
|
2016-04-03 08:02:57 -07:00
|
|
|
|
|
|
|
class PinRepository {
|
|
|
|
public:
|
|
|
|
PinRepository();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#define PORT_SIZE 16
|
|
|
|
|
2019-03-08 04:01:15 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
#define EXTERNC extern "C"
|
|
|
|
#else
|
|
|
|
#define EXTERNC
|
|
|
|
#endif
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
void initPinRepository(void);
|
2019-03-08 04:01:15 -08:00
|
|
|
EXTERNC bool markUsed(ioportid_t port, ioportmask_t pin, const char *msg);
|
|
|
|
EXTERNC void markUnused(ioportid_t port, ioportmask_t pin);
|
2015-07-10 06:01:56 -07:00
|
|
|
const char * getPinFunction(brain_input_pin_e brainPin);
|
|
|
|
void unmarkPin(brain_pin_e brainPin);
|
|
|
|
|
2019-03-08 04:01:15 -08:00
|
|
|
#undef EXTERNC
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
#endif /* PIN_REPOSITORY_H_ */
|