Skip to content

Commit

Permalink
Revise macro defined function names
Browse files Browse the repository at this point in the history
Append brackets to all macro defined function names
  • Loading branch information
Xylopyrographer authored Aug 25, 2024
1 parent 44b35d5 commit 4a88718
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions variants/jczn_2432s028r/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ static const uint8_t SCK = 18;
#define CYD_SCREEN_WIDTH CYD_TFT_WIDTH
#define CYD_SCREEN_HEIGHT CYD_TFT_HEIGHT

#define CYD_TFT_BL 21
#define CYD_TFT_BL_ENABLE ( ( pinMode( CYD_TFT_BL, OUTPUT ) ) )
#define CYD_TFT_BL_OFF ( digitalWrite( CYD_TFT_BL, 0 ) )
#define CYD_TFT_BL_ON ( digitalWrite( CYD_TFT_BL, 1 ) )
#define CYD_TFT_BL 21
#define CYD_TFT_BL_ENABLE() ( ( pinMode( CYD_TFT_BL, OUTPUT ) ) )
#define CYD_TFT_BL_OFF() ( digitalWrite( CYD_TFT_BL, 0 ) )
#define CYD_TFT_BL_ON() ( digitalWrite( CYD_TFT_BL, 1 ) )

#define CYD_LED_RED 4
#define CYD_LED_GREEN 16
Expand All @@ -71,15 +71,15 @@ static const uint8_t SCK = 18;

#define CYD_LDR 34

#define CYD_LED_RED_OFF ( digitalWrite( CYD_LED_RED, 1 ) )
#define CYD_LED_RED_ON ( digitalWrite( CYD_LED_RED, 0 ) )
#define CYD_LED_GREEN_OFF ( digitalWrite( CYD_LED_GREEN, 1 ) )
#define CYD_LED_GREEN_ON ( digitalWrite( CYD_LED_GREEN, 0 ) )
#define CYD_LED_BLUE_OFF ( digitalWrite( CYD_LED_BLUE, 1 ) )
#define CYD_LED_BLUE_ON ( digitalWrite( CYD_LED_BLUE, 0 ) )
#define CYD_LED_RGB_OFF CYD_LED_RED_OFF; CYD_LED_GREEN_OFF; CYD_LED_BLUE_OFF
#define CYD_LED_RGB_ON CYD_LED_RED_ON; CYD_LED_GREEN_ON; CYD_LED_BLUE_ON
#define CYD_LED_WHITE_OFF CYD_LED_RGB_OFF
#define CYD_LED_WHITE_ON CYD_LED_RGB_ON
#define CYD_LED_RED_OFF() ( digitalWrite( CYD_LED_RED, 1 ) )
#define CYD_LED_RED_ON() ( digitalWrite( CYD_LED_RED, 0 ) )
#define CYD_LED_GREEN_OFF() ( digitalWrite( CYD_LED_GREEN, 1 ) )
#define CYD_LED_GREEN_ON() ( digitalWrite( CYD_LED_GREEN, 0 ) )
#define CYD_LED_BLUE_OFF() ( digitalWrite( CYD_LED_BLUE, 1 ) )
#define CYD_LED_BLUE_ON() ( digitalWrite( CYD_LED_BLUE, 0 ) )
#define CYD_LED_RGB_OFF() CYD_LED_RED_OFF(); CYD_LED_GREEN_OFF(); CYD_LED_BLUE_OFF()
#define CYD_LED_RGB_ON() CYD_LED_RED_ON(); CYD_LED_GREEN_ON(); CYD_LED_BLUE_ON()
#define CYD_LED_WHITE_OFF() CYD_LED_RGB_OFF()
#define CYD_LED_WHITE_ON() CYD_LED_RGB_ON()

#endif /* Pins_Arduino_h */
2 changes: 1 addition & 1 deletion variants/jczn_2432s028r/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ extern "C" {
pinMode( CYD_LED_RED, OUTPUT );
pinMode( CYD_LED_GREEN, OUTPUT );
pinMode( CYD_LED_BLUE, OUTPUT );
CYD_LED_RGB_OFF;
CYD_LED_RGB_OFF();
}
}

0 comments on commit 4a88718

Please sign in to comment.