diff --git a/examples/zolertia/zoul/at-test/at-master-test.c b/examples/zolertia/zoul/at-test/at-master-test.c index 520c28bdb..1b7d14d53 100644 --- a/examples/zolertia/zoul/at-test/at-master-test.c +++ b/examples/zolertia/zoul/at-test/at-master-test.c @@ -481,7 +481,6 @@ PROCESS_THREAD(at_test_process, ev, data) } /*---------------------------------------------------------------------------*/ /** - * @} * @} * @} */ diff --git a/examples/zolertia/zoul/at-test/project-conf.h b/examples/zolertia/zoul/at-test/project-conf.h index 4a29f1d59..ef1581773 100644 --- a/examples/zolertia/zoul/at-test/project-conf.h +++ b/examples/zolertia/zoul/at-test/project-conf.h @@ -29,7 +29,7 @@ */ /*---------------------------------------------------------------------------*/ /** - * \addtogroup remote-examples + * \addtogroup zoul-examples * @{ * * \defgroup zoul-AT-master-test @@ -63,5 +63,8 @@ #define NETSTACK_CONF_RDC nullrdc_driver #endif /* PROJECT_CONF_H_ */ - -/** @} */ +/*---------------------------------------------------------------------------*/ +/** + * @} + * @} + */ diff --git a/examples/zolertia/zoul/cc1200-demo/cc1200-demo.c b/examples/zolertia/zoul/cc1200-demo/cc1200-demo.c index 1fe69f58c..4eb4d27b1 100644 --- a/examples/zolertia/zoul/cc1200-demo/cc1200-demo.c +++ b/examples/zolertia/zoul/cc1200-demo/cc1200-demo.c @@ -35,11 +35,12 @@ * @{ * * \file - * Test file for the CC1200 demo + * Test file for the CC1200 demo * * \author * Antonio Lignan */ +/*---------------------------------------------------------------------------*/ #include "contiki.h" #include "cpu.h" #include "sys/etimer.h" diff --git a/examples/zolertia/zoul/cc1200-demo/project-conf.h b/examples/zolertia/zoul/cc1200-demo/project-conf.h index 9367973ff..add005170 100644 --- a/examples/zolertia/zoul/cc1200-demo/project-conf.h +++ b/examples/zolertia/zoul/cc1200-demo/project-conf.h @@ -43,6 +43,7 @@ * \author * Antonio Lignan */ +/*---------------------------------------------------------------------------*/ #ifndef PROJECT_CONF_H_ #define PROJECT_CONF_H_ diff --git a/examples/zolertia/zoul/project-conf.h b/examples/zolertia/zoul/project-conf.h index 230724b2d..34f3116f6 100644 --- a/examples/zolertia/zoul/project-conf.h +++ b/examples/zolertia/zoul/project-conf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Texas Instruments Incorporated - http://www.ti.com/ + * Copyright (c) 2016, Zolertia - http://www.zolertia.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,13 +28,15 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/*---------------------------------------------------------------------------*/ /** - * \addtogroup remote-examples + * \addtogroup zoul-examples * @{ * * \file * Project specific configuration defines for the basic RE-Mote examples */ +/*---------------------------------------------------------------------------*/ #ifndef PROJECT_CONF_H_ #define PROJECT_CONF_H_ diff --git a/examples/zolertia/zoul/rev-a/Makefile.target b/examples/zolertia/zoul/rev-a/Makefile.target new file mode 100644 index 000000000..75430a6e4 --- /dev/null +++ b/examples/zolertia/zoul/rev-a/Makefile.target @@ -0,0 +1 @@ +TARGET = zoul diff --git a/examples/zolertia/zoul/rev-a/test-power-mgmt.c b/examples/zolertia/zoul/rev-a/test-power-mgmt.c index e5c2c65a0..a29668b22 100644 --- a/examples/zolertia/zoul/rev-a/test-power-mgmt.c +++ b/examples/zolertia/zoul/rev-a/test-power-mgmt.c @@ -80,18 +80,18 @@ static char * print_pm(uint8_t state) { switch(state) { - case PM_SYSOFF_ON: - return "Battery on"; - case PM_SYSOFF_OFF: - return "Battery off"; - case PM_TIMER_ENABLED: - return "Nano Timer enabled"; - case PM_TIMER_DISABLED: - return "Nano Timer disabled"; - case PM_AWAITING_RTC_EVENT: - return "Awaiting RTC event"; - default: - return "UNKNOWN"; + case PM_SYSOFF_ON: + return "Battery on"; + case PM_SYSOFF_OFF: + return "Battery off"; + case PM_TIMER_ENABLED: + return "Nano Timer enabled"; + case PM_TIMER_DISABLED: + return "Nano Timer disabled"; + case PM_AWAITING_RTC_EVENT: + return "Awaiting RTC event"; + default: + return "UNKNOWN"; } } /*---------------------------------------------------------------------------*/ @@ -107,24 +107,24 @@ get_status(uint8_t mask, uint8_t *val) } if(!mask) { - printf("STATUS %u\n", status); + printf("STATUS %u\n", status); *val = PM_IDLE; return PM_SUCCESS; } /* Read back ony the requested status bit */ switch(mask) { - case PM_SYSOFF_ON_MASK: - print_msg = (status & mask) ? PM_SYSOFF_ON : PM_SYSOFF_OFF; - break; - case PM_TIMER_ENABLED_MASK: - print_msg = (status & mask) ? PM_TIMER_ENABLED : PM_TIMER_DISABLED; - break; - case PM_AWAITING_RTC_EVENT_MASK: - print_msg = (status & mask) ? PM_AWAITING_RTC_EVENT : PM_AWAITING_RTC_DIS; - break; - default: - return PM_ERROR; + case PM_SYSOFF_ON_MASK: + print_msg = (status & mask) ? PM_SYSOFF_ON : PM_SYSOFF_OFF; + break; + case PM_TIMER_ENABLED_MASK: + print_msg = (status & mask) ? PM_TIMER_ENABLED : PM_TIMER_DISABLED; + break; + case PM_AWAITING_RTC_EVENT_MASK: + print_msg = (status & mask) ? PM_AWAITING_RTC_EVENT : PM_AWAITING_RTC_DIS; + break; + default: + return PM_ERROR; } printf("Status -> %s\n", print_pm(print_msg)); @@ -194,7 +194,7 @@ PROCESS_THREAD(test_remote_pm, ev, data) broadcast_send(&bc); /* And wait a few seconds before going to sleep */ - while(1){ + while(1) { etimer_set(&et, CLOCK_SECOND); PROCESS_WAIT_EVENT(); diff --git a/examples/zolertia/zoul/rtcc/Makefile.target b/examples/zolertia/zoul/rtcc/Makefile.target new file mode 100644 index 000000000..75430a6e4 --- /dev/null +++ b/examples/zolertia/zoul/rtcc/Makefile.target @@ -0,0 +1 @@ +TARGET = zoul diff --git a/examples/zolertia/zoul/rtcc/project-conf.h b/examples/zolertia/zoul/rtcc/project-conf.h index 9ff57c953..66bf67bc0 100644 --- a/examples/zolertia/zoul/rtcc/project-conf.h +++ b/examples/zolertia/zoul/rtcc/project-conf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Texas Instruments Incorporated - http://www.ti.com/ + * Copyright (c) 2015, Zolertia * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,18 +28,28 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/*---------------------------------------------------------------------------*/ /** - * \addtogroup remote-examples + * \addtogroup zoul-examples + * @{ + * + * \defgroup remote-rtcc-test RE-Mote on-board RTCC test application + * + * Test the Real-Time-Clock-Calendar built in the RE-Motes revision A and B * @{ * * \file - * Project specific configuration defines for the basic RE-Mote examples + * Project specific configuration defines for the RTCC RE-Mote example */ +/*---------------------------------------------------------------------------*/ #ifndef PROJECT_CONF_H_ #define PROJECT_CONF_H_ #define NETSTACK_CONF_RDC nullrdc_driver #endif /* PROJECT_CONF_H_ */ - -/** @} */ +/*---------------------------------------------------------------------------*/ +/** + * @} + * @} + */ diff --git a/examples/zolertia/zoul/rtcc/test-rtcc.c b/examples/zolertia/zoul/rtcc/test-rtcc.c index cb14d5fa5..9b8895c09 100644 --- a/examples/zolertia/zoul/rtcc/test-rtcc.c +++ b/examples/zolertia/zoul/rtcc/test-rtcc.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2015, Zolertia - http://www.zolertia.com + * Copyright (c) 2015, Zolertia + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,10 +30,8 @@ */ /*---------------------------------------------------------------------------*/ /** - * \addtogroup remote-examples + * \addtogroup remote-rtcc-test * @{ - - * \defgroup remote-rtcc-test RE-Mote on-board RTCC test application * * Example project to show the on-board RTCC configuration and operation * Retrieves the current time and date from the system, then sets an alarm to @@ -42,10 +41,8 @@ * @{ * * \file - * RE-Mote on-board RTCC test application - * + * RE-Mote on-board RTCC test application * \author - * * Antonio Lignan * Aitor Mejias * Toni Lozano @@ -178,4 +175,3 @@ PROCESS_THREAD(test_remote_rtcc_process, ev, data) * @} * @} */ - diff --git a/examples/zolertia/zoul/test-aac-sensor.c b/examples/zolertia/zoul/test-aac-sensor.c index bbda23955..d6d8bda01 100644 --- a/examples/zolertia/zoul/test-aac-sensor.c +++ b/examples/zolertia/zoul/test-aac-sensor.c @@ -28,20 +28,22 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/** * \addtogroup zoul-examples * @{ + * * \defgroup zoul-aac-sensor-test Test AAC sensor * * Demonstrates the operation of the current AAC analog sensor * @{ * * \file - * Example demonstrating the Zoul module on the RE-Mote & AAC sensor 0-5V 50Amps AC + * Example demonstrating the RE-Mote & AAC sensor 0-5V 50Amps AC * * \author * Javier Sánchez */ +/*---------------------------------------------------------------------------*/ #include "contiki.h" #include "sys/etimer.h" #include "sys/rtimer.h" @@ -64,7 +66,7 @@ AUTOSTART_PROCESSES(&test_aac_sensor_process); /*---------------------------------------------------------------------------*/ PROCESS_THREAD(test_aac_sensor_process, ev, data) { - + PROCESS_BEGIN(); counter = 0; @@ -86,12 +88,12 @@ PROCESS_THREAD(test_aac_sensor_process, ev, data) printf("-----------------------------------------\n" "Counter = 0x%08x\n", counter); - + printf("AC Amps = %d mA\n", adc_sensors.value(ANALOG_AAC_SENSOR)); - + etimer_set(&et, LOOP_INTERVAL); counter++; - } + } } PROCESS_END(); } @@ -100,3 +102,4 @@ PROCESS_THREAD(test_aac_sensor_process, ev, data) * @} * @} */ + diff --git a/examples/zolertia/zoul/test-ac-dimmer.c b/examples/zolertia/zoul/test-ac-dimmer.c index 521b023e3..6fd28faa7 100644 --- a/examples/zolertia/zoul/test-ac-dimmer.c +++ b/examples/zolertia/zoul/test-ac-dimmer.c @@ -70,7 +70,7 @@ PROCESS_THREAD(remote_ac_dimmer_process, ev, data) /* Set the lamp to 10% and wait a few seconds */ ac_dimmer.value(DIMMER_DEFAULT_MIN_DIMM_VALUE); etimer_set(&et, CLOCK_SECOND * 5); - PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et)); + PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et)); /* Upon testing for duty cycles lower than 10% there was noise (probably from * the triac), causing the driver to skip a beat, and from time to time made @@ -100,3 +100,4 @@ PROCESS_THREAD(remote_ac_dimmer_process, ev, data) * @} * @} */ + diff --git a/examples/zolertia/zoul/test-bmp085-bmp180.c b/examples/zolertia/zoul/test-bmp085-bmp180.c index 73cf0168f..81d54b31e 100644 --- a/examples/zolertia/zoul/test-bmp085-bmp180.c +++ b/examples/zolertia/zoul/test-bmp085-bmp180.c @@ -38,7 +38,7 @@ * @{ * * \file - * Test file for the BMP085/BMP180 digital pressure and temperature sensor + * Test file for the BMP085/BMP180 digital pressure and temp sensor * * \author * Antonio Lignan diff --git a/examples/zolertia/zoul/test-grove-gyro.c b/examples/zolertia/zoul/test-grove-gyro.c index 24baa360f..978aa69f8 100644 --- a/examples/zolertia/zoul/test-grove-gyro.c +++ b/examples/zolertia/zoul/test-grove-gyro.c @@ -85,7 +85,7 @@ PROCESS_THREAD(remote_grove_gyro_process, ev, data) * the 3 gyroscope axis use GROVE_GYRO_SENSOR. Alternatively the value * GROVE_GYRO_ALL could also be used to power everything at once */ - grove_gyro.configure(GROVE_GYRO_POWER_ON, GROVE_GYRO_SENSOR); + grove_gyro.configure(GROVE_GYRO_POWER_ON, GROVE_GYRO_SENSOR); /* Read back the configured sensor I2C address to check if the sensor is * working OK, this is the only case in which the value() returns a value @@ -128,9 +128,9 @@ PROCESS_THREAD(remote_grove_gyro_process, ev, data) /* This sensor has a different operation from others using Contiki's sensor * API, to make data acquisition we write the readings directly to the - * extern data structure, allowing to write more than 1 value at the same - * operation, and also allowing upon a data interrupt event to immediatly - * access the data. The return value of the value() call is then the status + * extern data structure, allowing to write more than 1 value at the same + * operation, and also allowing upon a data interrupt event to immediatly + * access the data. The return value of the value() call is then the status * result of the read operation */ if(grove_gyro.value(GROVE_GYRO_XYZ) == GROVE_GYRO_SUCCESS) { diff --git a/examples/zolertia/zoul/test-iaq.c b/examples/zolertia/zoul/test-iaq.c index 147ecd8a7..9940448ce 100644 --- a/examples/zolertia/zoul/test-iaq.c +++ b/examples/zolertia/zoul/test-iaq.c @@ -29,24 +29,25 @@ */ /*---------------------------------------------------------------------------*/ /** - * \addtogroup remote-examples + * \addtogroup zoul-examples * @{ - * \defgroup remote-iaq-test - * + * + * \defgroup zoul-iaq-test + * * RE-Mote external IAQ test application * Example of iAQ-Core implementation and simple operation reading the value - * of CO2, TVOC sensor and Status. The test checks for a each 5 minutes in + * of CO2, TVOC sensor and Status. The test checks for a each 5 minutes in * order to get the first true measurement as datasheet recomendation - * (standard result of 0x82 is obtained in first time). - * Then, once initialized, periodically each 5 seconds reads - * the values of the IAQ sensor and shows in the screen, toggling the LED + * (standard result of 0x82 is obtained in first time). + * Then, once initialized, periodically each 5 seconds reads + * the values of the IAQ sensor and shows in the screen, toggling the LED * red if CO2 was not initialized and LED green if the reading was succeed. * * @{ * \file - * RE-Mote implementation of external IAQ-CORE-C test application + * RE-Mote implementation of external IAQ-CORE-C test application * \author - * Aitor Mejias + * Aitor Mejias */ /*---------------------------------------------------------------------------*/ #include "contiki.h" @@ -87,17 +88,16 @@ PROCESS_THREAD(test_remote_iaq_process, ev, data) count_delay += LOOP_PERIOD; leds_toggle(LEDS_RED); printf("Test-IAQ: Initializing Time-elapsed: %u seconds of aprox. %lu sec.\n", - count_delay, IAQ_INIT_WAIT); + count_delay, IAQ_INIT_WAIT); } else if(status == IAQ_ACTIVE) { leds_off(LEDS_RED); leds_toggle(LEDS_GREEN); /* Get data from sensor: VOC, CO2 and internal status */ - printf("CO2 current value is: %d ppm\n", iaq.value(IAQ_VOC_VALUE)); - printf("TIAQ current value is: %d ppb\n", iaq.value(IAQ_CO2_VALUE)); + printf("CO2 current value is: %d ppm\n", iaq.value(IAQ_VOC_VALUE)); + printf("TIAQ current value is: %d ppb\n", iaq.value(IAQ_CO2_VALUE)); printf("Status is: 0x%0X\n", iaq.value(IAQ_STATUS)); - } - else { + } else { printf("iAQ-Core Error: 0x%02X\n", status); } } diff --git a/examples/zolertia/zoul/test-motion.c b/examples/zolertia/zoul/test-motion.c index b5c9c3f59..1a4edfcc5 100644 --- a/examples/zolertia/zoul/test-motion.c +++ b/examples/zolertia/zoul/test-motion.c @@ -40,7 +40,7 @@ * @{ * * \file - * Test application for the digital motion/presence sensor + * Test application for the digital motion/presence sensor * * \author * Antonio Lignan @@ -100,3 +100,4 @@ PROCESS_THREAD(test_presence_sensor, ev, data) * @} * @} */ + diff --git a/examples/zolertia/zoul/test-pm10-sensor.c b/examples/zolertia/zoul/test-pm10-sensor.c index d307f9050..2f6dfae42 100644 --- a/examples/zolertia/zoul/test-pm10-sensor.c +++ b/examples/zolertia/zoul/test-pm10-sensor.c @@ -31,13 +31,14 @@ /** * \addtogroup zoul-examples * @{ + * * \defgroup zoul-pm10-sensor-test Test PM10 sensor * * Demonstrates the operation of the Sharp PM10 analog sensor * @{ * * \file - * GP2Y1010AU0F PM10 sensor example using the ADC sensors wrapper + * GP2Y1010AU0F PM10 sensor example using the ADC sensors wrapper * * \author * Toni Lozano @@ -93,3 +94,4 @@ PROCESS_THREAD(test_pm10_sensor_process, ev, data) * @} * @} */ + diff --git a/examples/zolertia/zoul/test-relay.c b/examples/zolertia/zoul/test-relay.c index cd743919d..51f55e537 100644 --- a/examples/zolertia/zoul/test-relay.c +++ b/examples/zolertia/zoul/test-relay.c @@ -87,3 +87,4 @@ PROCESS_THREAD(remote_relay_process, ev, data) * @} * @} */ + diff --git a/examples/zolertia/zoul/test-rotation-sensor.c b/examples/zolertia/zoul/test-rotation-sensor.c index 76fb029ec..6e03d44ea 100644 --- a/examples/zolertia/zoul/test-rotation-sensor.c +++ b/examples/zolertia/zoul/test-rotation-sensor.c @@ -38,7 +38,7 @@ * @{ * * \file - * Phidget analog rotation sensor example using the ADC sensor wrapper + * Phidget analog rotation sensor example using the ADC sensor wrapper * * \author * Antonio Lignan diff --git a/examples/zolertia/zoul/test-servo.c b/examples/zolertia/zoul/test-servo.c index 9b65ae617..ab201c06d 100644 --- a/examples/zolertia/zoul/test-servo.c +++ b/examples/zolertia/zoul/test-servo.c @@ -105,3 +105,4 @@ PROCESS_THREAD(servo_test_process, ev, data) * @} * @} */ + diff --git a/examples/zolertia/zoul/test-vac-sensor.c b/examples/zolertia/zoul/test-vac-sensor.c index 37db59edf..5be57e44b 100644 --- a/examples/zolertia/zoul/test-vac-sensor.c +++ b/examples/zolertia/zoul/test-vac-sensor.c @@ -28,20 +28,23 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/*---------------------------------------------------------------------------*/ +/** * \addtogroup zoul-examples * @{ + * * \defgroup zoul-vac-sensor-test Test VAC sensor * * Demonstrates the operation of the voltage VAC analog sensor * @{ * * \file - * Example demonstrating the Zoul module on the RE-Mote & VAC sensor 0-5V 250V AC + * Example demonstrating the RE-Mote & VAC sensor 0-5V 250V AC * * \author * Javier Sánchez */ +/*---------------------------------------------------------------------------*/ #include "contiki.h" #include "sys/etimer.h" #include "sys/rtimer.h" @@ -65,7 +68,7 @@ AUTOSTART_PROCESSES(&test_vac_sensor_process); /*---------------------------------------------------------------------------*/ PROCESS_THREAD(test_vac_sensor_process, ev, data) { - + PROCESS_BEGIN(); counter = 0; @@ -90,10 +93,10 @@ PROCESS_THREAD(test_vac_sensor_process, ev, data) /*AC voltage value, with applied corresponding sensor algorithm*/ printf("AC voltage = %d V\n", adc_sensors.value(ANALOG_VAC_SENSOR)); - + etimer_set(&et, LOOP_INTERVAL); counter++; - } + } } PROCESS_END(); } @@ -102,3 +105,4 @@ PROCESS_THREAD(test_vac_sensor_process, ev, data) * @} * @} */ + diff --git a/examples/zolertia/zoul/test-weather-meter.c b/examples/zolertia/zoul/test-weather-meter.c index 2e2bcba2f..637ba8571 100644 --- a/examples/zolertia/zoul/test-weather-meter.c +++ b/examples/zolertia/zoul/test-weather-meter.c @@ -40,7 +40,7 @@ * @{ * * \file - * Test application for the Sparkfun's weather meter + * Test application for the Sparkfun's weather meter * * \author * Antonio Lignan @@ -153,7 +153,7 @@ PROCESS_THREAD(test_weather_meter_sensors, ev, data) } /*---------------------------------------------------------------------------*/ /** - * @} * @} * @} */ + diff --git a/examples/zolertia/zoul/test-zonik.c b/examples/zolertia/zoul/test-zonik.c index 622b73291..a046a950c 100644 --- a/examples/zolertia/zoul/test-zonik.c +++ b/examples/zolertia/zoul/test-zonik.c @@ -29,22 +29,23 @@ */ /*---------------------------------------------------------------------------*/ /** - * \addtogroup remote-examples + * \addtogroup zoul-examples * @{ + * * \defgroup remote-zonik-test Zolertia Zonik sonometer test application * * Example of Zonik board implementation and simple operation: Infinite loop * enablinkg the sensor and rading few times, acquiring the dBA of sensor * The first value acquired is invalid, because it's in hw init state awaiting - * a valid internal reading.Once the driver is initialized, posterior readings + * a valid internal reading.Once the driver is initialized, posterior readings * are valid.Finally in the loop disables the board with standard call and * shows the error, and loop again enabling it. * * @{ * \file - * RE-Mote test application of Zolertia Zonik sound sensor + * RE-Mote test application of Zolertia Zonik sound sensor * \author - * Aitor Mejias + * Aitor Mejias */ /*---------------------------------------------------------------------------*/ #include "contiki.h" @@ -70,17 +71,17 @@ PROCESS_THREAD(test_remote_zonik_process, ev, data) PROCESS_BEGIN(); printf("Initial status of sensor is: 0x%04X\n", - zonik.status(SENSORS_ACTIVE)); + zonik.status(SENSORS_ACTIVE)); while(1) { /* Configure Zonik and activate the internal process readings */ SENSORS_ACTIVATE(zonik); printf("Initialized. Sensor status: 0x%04X\n", - zonik.status(SENSORS_ACTIVE)); + zonik.status(SENSORS_ACTIVE)); /* Read sensor value dBA multiple times */ - for(i=0; i