let's admit it we are using C++ syntax
This commit is contained in:
parent
ccc08fe7db
commit
6b5e42a7a6
|
@ -14,8 +14,6 @@
|
||||||
#include "io_pins.h"
|
#include "io_pins.h"
|
||||||
#include "efi_gpio.h"
|
#include "efi_gpio.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
|
|
||||||
class PinRepository {
|
class PinRepository {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
@ -25,29 +23,27 @@ class PinRepository {
|
||||||
const char *PIN_USED[BRAIN_PIN_TOTAL_PINS];
|
const char *PIN_USED[BRAIN_PIN_TOTAL_PINS];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
bool isBrainPinValid(brain_pin_e brainPin);
|
bool isBrainPinValid(brain_pin_e brainPin);
|
||||||
|
|
||||||
void initPinRepository(void);
|
void initPinRepository(void);
|
||||||
EXTERNC bool brain_pin_is_onchip(brain_pin_e brainPin);
|
bool brain_pin_is_onchip(brain_pin_e brainPin);
|
||||||
EXTERNC bool brain_pin_is_ext(brain_pin_e brainPin);
|
bool brain_pin_is_ext(brain_pin_e brainPin);
|
||||||
void pinDiag2string(char *buffer, size_t size, brain_pin_diag_e pin_diag);
|
void pinDiag2string(char *buffer, size_t size, brain_pin_diag_e pin_diag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Usually high-level code would invoke efiSetPadMode, not this method directly
|
* Usually high-level code would invoke efiSetPadMode, not this method directly
|
||||||
*/
|
*/
|
||||||
EXTERNC bool brain_pin_markUsed(brain_pin_e brainPin, const char *msg);
|
bool brain_pin_markUsed(brain_pin_e brainPin, const char *msg);
|
||||||
/**
|
/**
|
||||||
* See also efiSetPadUnused
|
* See also efiSetPadUnused
|
||||||
*/
|
*/
|
||||||
EXTERNC void brain_pin_markUnused(brain_pin_e brainPin);
|
void brain_pin_markUnused(brain_pin_e brainPin);
|
||||||
const char * getPinFunction(brain_input_pin_e brainPin);
|
const char * getPinFunction(brain_input_pin_e brainPin);
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
/* For on-chip gpios only */
|
/* For on-chip gpios only */
|
||||||
EXTERNC bool gpio_pin_markUsed(ioportid_t port, ioportmask_t pin, const char *msg);
|
bool gpio_pin_markUsed(ioportid_t port, ioportmask_t pin, const char *msg);
|
||||||
EXTERNC void gpio_pin_markUnused(ioportid_t port, ioportmask_t pin);
|
void gpio_pin_markUnused(ioportid_t port, ioportmask_t pin);
|
||||||
#endif /* EFI_PROD_CODE*/
|
#endif /* EFI_PROD_CODE*/
|
||||||
|
|
||||||
/* defined in ports/ */
|
/* defined in ports/ */
|
||||||
|
@ -61,7 +57,4 @@ const char *hwPortname(brain_pin_e brainPin);
|
||||||
// the main usage for human-readable board-specific pin reference is convenience of error messages in case of pin conflict.
|
// the main usage for human-readable board-specific pin reference is convenience of error messages in case of pin conflict.
|
||||||
const char * getBoardSpecificPinName(brain_pin_e brainPin);
|
const char * getBoardSpecificPinName(brain_pin_e brainPin);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
const char* & getBrainUsedPin(unsigned int idx);
|
const char* & getBrainUsedPin(unsigned int idx);
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue