From 6b5e42a7a6ef1d4f6ee89dc094bcd6e499b4c444 Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 21 Aug 2023 22:26:09 -0400 Subject: [PATCH] let's admit it we are using C++ syntax --- firmware/hw_layer/pin_repository.h | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/firmware/hw_layer/pin_repository.h b/firmware/hw_layer/pin_repository.h index c9b35f62e8..54088bc9ef 100644 --- a/firmware/hw_layer/pin_repository.h +++ b/firmware/hw_layer/pin_repository.h @@ -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 -