2014-04-13 22:10:01 -07:00
|
|
|
/*
|
2016-11-04 07:18:34 -07:00
|
|
|
Copyright 2016 Benjamin Vedder benjamin@vedder.se
|
2014-04-13 22:10:01 -07:00
|
|
|
|
2016-11-04 07:18:34 -07:00
|
|
|
This file is part of the VESC firmware.
|
|
|
|
|
|
|
|
The VESC firmware is free software: you can redistribute it and/or modify
|
2014-04-13 22:10:01 -07:00
|
|
|
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.
|
|
|
|
|
2016-11-04 07:18:34 -07:00
|
|
|
The VESC firmware is distributed in the hope that it will be useful,
|
2014-04-13 22:10:01 -07:00
|
|
|
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 <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2014-04-18 15:09:46 -07:00
|
|
|
#ifndef APP_H_
|
|
|
|
#define APP_H_
|
2014-04-13 22:10:01 -07:00
|
|
|
|
2014-04-14 14:02:45 -07:00
|
|
|
#include "conf_general.h"
|
|
|
|
|
2014-04-13 22:10:01 -07:00
|
|
|
// Functions
|
2014-09-17 12:05:57 -07:00
|
|
|
const app_configuration* app_get_configuration(void);
|
|
|
|
void app_set_configuration(app_configuration *conf);
|
2019-02-18 10:30:19 -08:00
|
|
|
void app_disable_output(int time_ms);
|
|
|
|
bool app_is_output_disabled(void);
|
2014-09-17 12:05:57 -07:00
|
|
|
|
|
|
|
// Standard apps
|
|
|
|
void app_ppm_start(void);
|
2016-11-04 07:18:34 -07:00
|
|
|
void app_ppm_stop(void);
|
2017-09-04 12:12:43 -07:00
|
|
|
float app_ppm_get_decoded_level(void);
|
2015-02-19 12:20:07 -08:00
|
|
|
void app_ppm_configure(ppm_config *conf);
|
2016-11-04 07:18:34 -07:00
|
|
|
|
2015-08-23 09:26:05 -07:00
|
|
|
void app_adc_start(bool use_rx_tx);
|
2016-11-04 07:18:34 -07:00
|
|
|
void app_adc_stop(void);
|
2015-05-04 14:25:43 -07:00
|
|
|
void app_adc_configure(adc_config *conf);
|
|
|
|
float app_adc_get_decoded_level(void);
|
|
|
|
float app_adc_get_voltage(void);
|
2016-02-02 07:28:55 -08:00
|
|
|
float app_adc_get_decoded_level2(void);
|
|
|
|
float app_adc_get_voltage2(void);
|
2016-11-04 07:18:34 -07:00
|
|
|
|
2014-09-18 14:00:14 -07:00
|
|
|
void app_uartcomm_start(void);
|
2019-02-18 10:30:19 -08:00
|
|
|
void app_uartcomm_start_permanent(void);
|
2016-11-04 07:18:34 -07:00
|
|
|
void app_uartcomm_stop(void);
|
2014-09-20 04:41:18 -07:00
|
|
|
void app_uartcomm_configure(uint32_t baudrate);
|
2019-02-18 10:30:19 -08:00
|
|
|
void app_uartcomm_send_packet(unsigned char *data, unsigned int len);
|
2016-11-04 07:18:34 -07:00
|
|
|
|
2014-10-18 16:00:53 -07:00
|
|
|
void app_nunchuk_start(void);
|
2016-11-04 07:18:34 -07:00
|
|
|
void app_nunchuk_stop(void);
|
2015-02-19 12:20:07 -08:00
|
|
|
void app_nunchuk_configure(chuk_config *conf);
|
2014-10-18 16:00:53 -07:00
|
|
|
float app_nunchuk_get_decoded_chuk(void);
|
2015-04-11 01:07:36 -07:00
|
|
|
void app_nunchuk_update_output(chuck_data *data);
|
2014-04-13 22:10:01 -07:00
|
|
|
|
2014-09-17 12:05:57 -07:00
|
|
|
// Custom apps
|
2017-09-04 12:12:43 -07:00
|
|
|
void app_custom_start(void);
|
|
|
|
void app_custom_stop(void);
|
|
|
|
void app_custom_configure(app_configuration *conf);
|
2014-09-17 12:05:57 -07:00
|
|
|
|
2014-04-18 15:09:46 -07:00
|
|
|
#endif /* APP_H_ */
|