Skip to content

Commit 1273713

Browse files
committed
def a constant for the LED pin on the breakout board
1 parent 8910367 commit 1273713

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/sfTk/sfDevFPC2534.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,8 @@ fpc_result_t sfDevFPC2534::setLED(bool ledOn)
697697
if (_comm == nullptr)
698698
return FPC_RESULT_WRONG_STATE;
699699

700-
fpc_result_t rc =
701-
requestSetGPIO(1, GPIO_CONTROL_MODE_OUTPUT_PP, ledOn ? GPIO_CONTROL_STATE_SET : GPIO_CONTROL_STATE_RESET);
700+
fpc_result_t rc = requestSetGPIO(SPARKFUN_FPC2534_LED_PIN, GPIO_CONTROL_MODE_OUTPUT_PP,
701+
ledOn ? GPIO_CONTROL_STATE_SET : GPIO_CONTROL_STATE_RESET);
702702
if (rc == FPC_RESULT_OK)
703703
{
704704
delay(50);

src/sfTk/sfDevFPC2534.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
// This library is dependent on Arduino framework
2424
#include <Arduino.h>
2525

26+
// Define the LED pin on the FPC2534 board
27+
const uint8_t SPARKFUN_FPC2534_LED_PIN = 1;
28+
2629
// The design pattern that the library implements follows the standard implementation
2730
// pattern of the FPC SDK - response from the sensor is delivered via callback functions.
2831
//

0 commit comments

Comments
 (0)