/*
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) && ((BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X))) || defined(__DOXYGEN__)
#include
#include
/******************************************************************************/
/* LOCAL DEFINITIONS */
/******************************************************************************/
/******************************************************************************/
/* EXPORTED VARIABLES */
/******************************************************************************/
/******************************************************************************/
/* LOCAL TYPES */
/******************************************************************************/
/******************************************************************************/
/* LOCAL VARIABLES */
/******************************************************************************/
static aos_test_at42qt1050data_t _data = {
/* AT42QT1050 driver */ &moduleLldTouch,
/* timeout */ MICROSECONDS_PER_SECOND,
/* event source */ &aos.events.gpio,
/* event flags */ MODULE_OS_GPIOEVENTFLAG_TOUCHINT,
};
static AOS_TEST(_test, "AT42QT1050", "touch sensor", moduleTestAt42qt1050ShellCb, aosTestAt42qt1050Func, &_data);
/******************************************************************************/
/* LOCAL FUNCTIONS */
/******************************************************************************/
/******************************************************************************/
/* EXPORTED FUNCTIONS */
/******************************************************************************/
int moduleTestAt42qt1050ShellCb(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_DISTANCESENSOR_VL53L0X) || (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X)) */