Skip to content

Commit

Permalink
.github/workflows: Run digital IO test in HIL setup.
Browse files Browse the repository at this point in the history
Signed-off-by: Ramya Subramanyam <[email protected]>
  • Loading branch information
ramya-subramanyam committed Jan 17, 2025
1 parent e3824cd commit fbb9017
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/hil_unity_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
echo "=============================================================================================================="
echo "Run Tests"
echo "=============================================================================================================="
make FQBN=${{ env.fqbn }} PORT=/dev/ttyACM0 math
make FQBN=${{ env.fqbn }} PORT=/dev/ttyACM0 test_digitalio_single
mkdir -p ~/artefact/unit_tests/${{ env.device }}
mv ./build/* ~/artefact/unit_tests/.
echo "=============================================================================================================="
Expand Down
6 changes: 0 additions & 6 deletions cores/psoc/digital_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,10 @@ void pinMode(pin_size_t pin, PinMode mode) {
}

uint8_t digitalRead(uint8_t pin) {
if (pin > GPIO_PIN_COUNT) {
return LOW; // Invalid pin number
}
return cyhal_gpio_read(mapping_gpio_pin[pin]) ? HIGH : LOW;
}

void digitalWrite(uint8_t pin, uint8_t value) {
if (pin > GPIO_PIN_COUNT) {
return; // Invalid pin number
}
cyhal_gpio_write(mapping_gpio_pin[pin], value);
}

Expand Down

0 comments on commit fbb9017

Please sign in to comment.