let's admit it we are using C++ syntax

This commit is contained in:
rusefi 2023-08-21 22:26:09 -04:00
parent ccc08fe7db
commit 6b5e42a7a6
1 changed files with 6 additions and 13 deletions

View File

@ -14,8 +14,6 @@
#include "io_pins.h"
#include "efi_gpio.h"
#ifdef __cplusplus
class PinRepository {
public:
/**
@ -25,29 +23,27 @@ class PinRepository {
const char *PIN_USED[BRAIN_PIN_TOTAL_PINS];
};
#endif /* __cplusplus */
bool isBrainPinValid(brain_pin_e brainPin);
void initPinRepository(void);
EXTERNC bool brain_pin_is_onchip(brain_pin_e brainPin);
EXTERNC bool brain_pin_is_ext(brain_pin_e brainPin);
bool brain_pin_is_onchip(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);
/**
* 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
*/
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);
#if EFI_PROD_CODE
/* For on-chip gpios only */
EXTERNC bool gpio_pin_markUsed(ioportid_t port, ioportmask_t pin, const char *msg);
EXTERNC void gpio_pin_markUnused(ioportid_t port, ioportmask_t pin);
bool gpio_pin_markUsed(ioportid_t port, ioportmask_t pin, const char *msg);
void gpio_pin_markUnused(ioportid_t port, ioportmask_t pin);
#endif /* EFI_PROD_CODE*/
/* 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.
const char * getBoardSpecificPinName(brain_pin_e brainPin);
#ifdef __cplusplus
const char* & getBrainUsedPin(unsigned int idx);
#endif