Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
embedded-kiddie committed May 26, 2024
1 parent 0f14fb1 commit 4282451
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ The following codes modulate LED (`LED_BUILTIN`) in `loop()` and also blink LEDs
#include "CBTimer.h"

void callback_func(void) {
static int n = 0;
static bool flag;

#if defined(ARDUINO_MINIMA)

if (n++ % 2) {
if (flag = !flag) {
digitalWrite(LED_TX, HIGH);
digitalWrite(LED_RX, LOW);
} else {
Expand All @@ -25,7 +25,11 @@ void callback_func(void) {
#elif defined(ARDUINO_UNOWIFIR4)

// P109 Port Output Data
R_BSP_PinWrite(BSP_IO_PORT_01_PIN_09, (n++ % 2 ? BSP_IO_LEVEL_HIGH : BSP_IO_LEVEL_LOW));
if (flag = !flag) {
R_BSP_PinWrite(BSP_IO_PORT_01_PIN_09, BSP_IO_LEVEL_HIGH);
} else {
R_BSP_PinWrite(BSP_IO_PORT_01_PIN_09, BSP_IO_LEVEL_LOW);
}

#endif
}
Expand Down

0 comments on commit 4282451

Please sign in to comment.