/*
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
Copyright (C) 2016..2020 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) || defined(__DOXYGEN__)
#include
#include
/******************************************************************************/
/* LOCAL DEFINITIONS */
/******************************************************************************/
/******************************************************************************/
/* EXPORTED VARIABLES */
/******************************************************************************/
/******************************************************************************/
/* LOCAL TYPES */
/******************************************************************************/
/******************************************************************************/
/* LOCAL VARIABLES */
/******************************************************************************/
static aos_test_buttondata_t _data = {
/* button */ &moduleLldUserButton,
/* event source */ &aos.events.gpio,
/* event flags */ MODULE_OS_GPIOEVENTFLAG_USERBUTTON,
};
static AOS_TEST(_test, "button", NULL, moduleTestButtonShellCb, aosTestButtonFunc, &_data);
/******************************************************************************/
/* LOCAL FUNCTIONS */
/******************************************************************************/
/******************************************************************************/
/* EXPORTED FUNCTIONS */
/******************************************************************************/
int moduleTestButtonShellCb(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) */