/*
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
Copyright (C) 2016..2019 Thomas Schöpping et al.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
#include
#if ((AMIROOS_CFG_TESTS_ENABLE == true) && (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR)) || defined(__DOXYGEN__)
#include
#include
/******************************************************************************/
/* LOCAL DEFINITIONS */
/******************************************************************************/
/******************************************************************************/
/* EXPORTED VARIABLES */
/******************************************************************************/
/******************************************************************************/
/* LOCAL TYPES */
/******************************************************************************/
/******************************************************************************/
/* LOCAL VARIABLES */
/******************************************************************************/
static aos_test_mpr121data_t _data= {
/* MPR121 driver */ &moduleLldTouch,
/* timeout */ MICROSECONDS_PER_SECOND,
/* event source */ &aos.events.gpio,
/* event flags */ MODULE_OS_GPIOEVENTFLAG_TOUCHINT,
};
static AOS_TEST(_test, "MPR121", "touch sensor", moduleTestMpr121ShellCb, aosTestMpr121Func, &_data);
/******************************************************************************/
/* LOCAL FUNCTIONS */
/******************************************************************************/
/******************************************************************************/
/* EXPORTED FUNCTIONS */
/******************************************************************************/
int moduleTestMpr121ShellCb(BaseSequentialStream* stream, int argc, char* argv[], aos_testresult_t* result)
{
(void)argc;
(void)argv;
if (result != NULL) {
*result = aosTestRun(stream, &_test, NULL);
} else {
aosTestRun(stream, &_test, NULL);
}
return AOS_OK;
}
#endif /* (AMIROOS_CFG_TESTS_ENABLE == true) && (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) */