Updated the OpenMote-CC2538 platform and examples.

This commit is contained in:
Pere Tuset 2016-04-11 15:32:29 +02:00
parent 1d3c37d6da
commit 3e00ea55d1
30 changed files with 895 additions and 868 deletions

View file

@ -27,33 +27,48 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
/*---------------------------------------------------------------------------*/
/**
* \addtogroup platform
* \addtogroup openmote-cc2538
* @{
*
* \defgroup openmote
* \defgroup openmote-button-sensor OpenMote-CC2538 user button driver
*
* The user button will generate a sensors_changed event on press as
* well as on release.
*
* @{
*
* \file
* Header for the OpenMote-CC2538 buttons
*
* Header for the OpenMote-CC2538 button driver
*/
/*---------------------------------------------------------------------------*/
#ifndef BUTTON_SENSOR_H_
#define BUTTON_SENSOR_H_
/*---------------------------------------------------------------------------*/
#include "lib/sensors.h"
#include "dev/gpio.h"
/*---------------------------------------------------------------------------*/
#define BUTTON_SENSOR "Button"
extern const struct sensors_sensor button_sensor;
/*---------------------------------------------------------------------------*/
#define button_sensor button_user_sensor
extern const struct sensors_sensor button_user_sensor;
extern process_event_t button_press_duration_exceeded;
/*---------------------------------------------------------------------------*/
#define BUTTON_SENSOR_CONFIG_TYPE_INTERVAL 0x0100
#define BUTTON_SENSOR_VALUE_TYPE_LEVEL 0
#define BUTTON_SENSOR_VALUE_TYPE_PRESS_DURATION 1
#define BUTTON_SENSOR_PRESSED_LEVEL 0
#define BUTTON_SENSOR_RELEASED_LEVEL 8
/*---------------------------------------------------------------------------*/
#endif /* BUTTON_SENSOR_H_ */
/** \brief Common initialiser for all SmartRF Buttons */
void button_sensor_init();
/*---------------------------------------------------------------------------*/
/** @} */
/**
* @}
* @}
*/