1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Run new astyle formatter against all the examples

This commit is contained in:
Federico Fissore
2013-10-21 09:58:40 +02:00
parent 3c6ee46828
commit b4c68b3dff
259 changed files with 5160 additions and 5217 deletions

View File

@ -2,11 +2,11 @@
ADK Terminal Test
This demonstrates USB Host connectivity between an
This demonstrates USB Host connectivity between an
Android phone and an Arduino Due.
The ADK for the Arduino Due is a work in progress
For additional information on the Arduino ADK visit
For additional information on the Arduino ADK visit
http://labs.arduino.cc/ADK/Index
created 27 June 2012
@ -29,42 +29,42 @@ char serialNumber[] = "1";
char url[] = "http://labs.arduino.cc/uploads/ADK/ArduinoTerminal/ThibaultTerminal_ICS_0001.apk";
USBHost Usb;
ADK adk(&Usb, companyName, applicationName, accessoryName,versionNumber,url,serialNumber);
ADK adk(&Usb, companyName, applicationName, accessoryName, versionNumber, url, serialNumber);
void setup()
{
cpu_irq_enable();
printf("\r\nADK demo start\r\n");
delay(200);
cpu_irq_enable();
printf("\r\nADK demo start\r\n");
delay(200);
}
#define RCVSIZE 128
void loop()
{
uint8_t buf[RCVSIZE];
uint32_t nbread = 0;
char helloworld[] = "Hello World!\r\n";
uint8_t buf[RCVSIZE];
uint32_t nbread = 0;
char helloworld[] = "Hello World!\r\n";
Usb.Task();
Usb.Task();
if (adk.isReady())
{
/* Write hello string to ADK */
adk.write(strlen(helloworld), (uint8_t *)helloworld);
if (adk.isReady())
{
/* Write hello string to ADK */
adk.write(strlen(helloworld), (uint8_t *)helloworld);
delay(1000);
delay(1000);
/* Read data from ADK and print to UART */
adk.read(&nbread, RCVSIZE, buf);
if (nbread > 0)
{
printf("RCV: ");
for (uint32_t i = 0; i < nbread; ++i)
{
printf("%c", (char)buf[i]);
}
printf("\r\n");
}
}
/* Read data from ADK and print to UART */
adk.read(&nbread, RCVSIZE, buf);
if (nbread > 0)
{
printf("RCV: ");
for (uint32_t i = 0; i < nbread; ++i)
{
printf("%c", (char)buf[i]);
}
printf("\r\n");
}
}
}