mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Fixes coding style.
Adds examples to travis.
This commit is contained in:
parent
401f4991e9
commit
1d7dbd640b
6 changed files with 37 additions and 35 deletions
|
@ -39,6 +39,9 @@ env:
|
|||
- PLATFORMIO_CI_SRC=examples/board_qc
|
||||
- PLATFORMIO_CI_SRC=examples/cdc_XR21B1411/XR_terminal
|
||||
- PLATFORMIO_CI_SRC=examples/ftdi/USBFTDILoopback
|
||||
- PLATFORMIO_CI_SRC=examples/GPIO/Blink
|
||||
- PLATFORMIO_CI_SRC=examples/GPIO/Blink_LowLevel
|
||||
- PLATFORMIO_CI_SRC=examples/GPIO/Input
|
||||
- PLATFORMIO_CI_SRC=examples/HID/le3dp
|
||||
- PLATFORMIO_CI_SRC=examples/HID/scale
|
||||
- PLATFORMIO_CI_SRC=examples/HID/SRWS1
|
||||
|
|
|
@ -29,8 +29,7 @@ UHS2_GPIO implements "wiring" style GPIO access. Implemented by Brian Walton bri
|
|||
|
||||
#include "Usb.h"
|
||||
|
||||
class UHS2_GPIO
|
||||
{
|
||||
class UHS2_GPIO {
|
||||
public:
|
||||
UHS2_GPIO(USB *pUsb);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ void loop()
|
|||
// Get the current output value, toggle then wait half a second
|
||||
uint8_t nGPO = Usb.gpioRdOutput();
|
||||
uint8_t nValue = ((nGPO & 0x01) == 0x01) ? 0 : 1;
|
||||
nGPO &= 0xFE; //clear bit 0
|
||||
nGPO &= 0xFE; // Clear bit 0
|
||||
nGPO |= nValue;
|
||||
Usb.gpioWr(nGPO);
|
||||
Serial.print(nValue ? "+" : "."); // Debug to show what the output should be doing
|
||||
|
|
|
@ -32,7 +32,7 @@ void loop()
|
|||
{
|
||||
// Get the value of input, set value of output
|
||||
int nValue = GPIO.digitalRead(INPUT_PIN);
|
||||
nValue = (nValue?0:1);
|
||||
nValue = (nValue ? LOW : HIGH);
|
||||
GPIO.digitalWrite(OUTPUT_PIN, nValue);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue