Zoul: cleaned headers, doxygen tags and uncrustified
This commit is contained in:
parent
3227360b92
commit
e25a62997d
|
@ -481,7 +481,6 @@ PROCESS_THREAD(at_test_process, ev, data)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -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_ */
|
||||
|
||||
/** @} */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -35,11 +35,12 @@
|
|||
* @{
|
||||
*
|
||||
* \file
|
||||
* Test file for the CC1200 demo
|
||||
* Test file for the CC1200 demo
|
||||
*
|
||||
* \author
|
||||
* Antonio Lignan <alinan@zolertia.com>
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "contiki.h"
|
||||
#include "cpu.h"
|
||||
#include "sys/etimer.h"
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
* \author
|
||||
* Antonio Lignan <alinan@zolertia.com>
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifndef PROJECT_CONF_H_
|
||||
#define 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_
|
||||
|
||||
|
|
1
examples/zolertia/zoul/rev-a/Makefile.target
Normal file
1
examples/zolertia/zoul/rev-a/Makefile.target
Normal file
|
@ -0,0 +1 @@
|
|||
TARGET = zoul
|
|
@ -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();
|
||||
|
||||
|
|
1
examples/zolertia/zoul/rtcc/Makefile.target
Normal file
1
examples/zolertia/zoul/rtcc/Makefile.target
Normal file
|
@ -0,0 +1 @@
|
|||
TARGET = zoul
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, Texas Instruments Incorporated - http://www.ti.com/
|
||||
* Copyright (c) 2015, Zolertia <http://www.zolertia.com>
|
||||
* 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_ */
|
||||
|
||||
/** @} */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2015, Zolertia - http://www.zolertia.com
|
||||
* Copyright (c) 2015, Zolertia <http://www.zolertia.com>
|
||||
* 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 <alinan@zolertia.com>
|
||||
* Aitor Mejias <amejias@zolertia.com>
|
||||
* Toni Lozano <tlozano@zolertia.com>
|
||||
|
@ -178,4 +175,3 @@ PROCESS_THREAD(test_remote_rtcc_process, ev, data)
|
|||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
|
|
@ -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 <asanchez@zolertia.com>
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "contiki.h"
|
||||
#include "sys/etimer.h"
|
||||
#include "sys/rtimer.h"
|
||||
|
@ -100,3 +102,4 @@ PROCESS_THREAD(test_aac_sensor_process, ev, data)
|
|||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
|
|
@ -100,3 +100,4 @@ PROCESS_THREAD(remote_ac_dimmer_process, ev, data)
|
|||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
|
|
@ -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 <alinan@zolertia.com>
|
||||
|
|
|
@ -29,9 +29,10 @@
|
|||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \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
|
||||
|
@ -44,9 +45,9 @@
|
|||
*
|
||||
* @{
|
||||
* \file
|
||||
* RE-Mote implementation of external IAQ-CORE-C test application
|
||||
* RE-Mote implementation of external IAQ-CORE-C test application
|
||||
* \author
|
||||
* Aitor Mejias <amejias@zolertia.com>
|
||||
* Aitor Mejias <amejias@zolertia.com>
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
* @{
|
||||
*
|
||||
* \file
|
||||
* Test application for the digital motion/presence sensor
|
||||
* Test application for the digital motion/presence sensor
|
||||
*
|
||||
* \author
|
||||
* Antonio Lignan <alinan@zolertia.com>
|
||||
|
@ -100,3 +100,4 @@ PROCESS_THREAD(test_presence_sensor, ev, data)
|
|||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
|
|
@ -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 <tlozano@zolertia.com>
|
||||
|
@ -93,3 +94,4 @@ PROCESS_THREAD(test_pm10_sensor_process, ev, data)
|
|||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
|
|
@ -87,3 +87,4 @@ PROCESS_THREAD(remote_relay_process, ev, data)
|
|||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
|
|
@ -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 <alinan@zolertia.com>
|
||||
|
|
|
@ -105,3 +105,4 @@ PROCESS_THREAD(servo_test_process, ev, data)
|
|||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
|
|
@ -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 <asanchez@zolertia.com>
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "contiki.h"
|
||||
#include "sys/etimer.h"
|
||||
#include "sys/rtimer.h"
|
||||
|
@ -102,3 +105,4 @@ PROCESS_THREAD(test_vac_sensor_process, ev, data)
|
|||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
* @{
|
||||
*
|
||||
* \file
|
||||
* Test application for the Sparkfun's weather meter
|
||||
* Test application for the Sparkfun's weather meter
|
||||
*
|
||||
* \author
|
||||
* Antonio Lignan <alinan@zolertia.com>
|
||||
|
@ -153,7 +153,7 @@ PROCESS_THREAD(test_weather_meter_sensors, ev, data)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
|
|
@ -29,8 +29,9 @@
|
|||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \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
|
||||
|
@ -42,9 +43,9 @@
|
|||
*
|
||||
* @{
|
||||
* \file
|
||||
* RE-Mote test application of Zolertia Zonik sound sensor
|
||||
* RE-Mote test application of Zolertia Zonik sound sensor
|
||||
* \author
|
||||
* Aitor Mejias <amejias@zolertia.com>
|
||||
* Aitor Mejias <amejias@zolertia.com>
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#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<MAX_VALID_READINGS; i++) {
|
||||
for(i = 0; i < MAX_VALID_READINGS; i++) {
|
||||
/* Wait a bit */
|
||||
etimer_set(&et, CLOCK_SECOND);
|
||||
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
|
||||
|
@ -92,13 +93,13 @@ PROCESS_THREAD(test_remote_zonik_process, ev, data)
|
|||
}
|
||||
|
||||
printf("Sensor status is: 0x%04X\n",
|
||||
zonik.status(SENSORS_ACTIVE));
|
||||
zonik.status(SENSORS_ACTIVE));
|
||||
|
||||
/* Disable Zonik sensor */
|
||||
SENSORS_DEACTIVATE(zonik);
|
||||
printf("Process Stopped: 0x%04X\n", zonik.status(SENSORS_ACTIVE));
|
||||
|
||||
for(i=0; i<MAX_INVALID_READINGS; i++) {
|
||||
for(i = 0; i < MAX_INVALID_READINGS; i++) {
|
||||
/* Wait a bit */
|
||||
etimer_set(&et, CLOCK_SECOND);
|
||||
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \addtogroup zoul
|
||||
* @{
|
||||
|
@ -62,6 +63,7 @@
|
|||
* \file
|
||||
* Example demonstrating the Zoul module on the RE-Mote & Firefly platforms
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "contiki.h"
|
||||
#include "cpu.h"
|
||||
#include "sys/etimer.h"
|
||||
|
@ -194,3 +196,4 @@ PROCESS_THREAD(zoul_demo_process, ev, data)
|
|||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue