2014-09-19 18:27:06 -07:00
|
|
|
/*
|
2016-11-04 07:18:34 -07:00
|
|
|
Copyright 2016 Benjamin Vedder benjamin@vedder.se
|
2014-09-19 18:27:06 -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-09-19 18:27:06 -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-09-19 18:27:06 -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-09-19 18:22:38 -07:00
|
|
|
#ifndef COMMANDS_H_
|
|
|
|
#define COMMANDS_H_
|
|
|
|
|
|
|
|
#include "datatypes.h"
|
|
|
|
|
|
|
|
// Functions
|
2014-09-20 04:41:18 -07:00
|
|
|
void commands_init(void);
|
2015-05-20 07:13:48 -07:00
|
|
|
void commands_send_packet(unsigned char *data, unsigned int len);
|
2019-02-18 10:30:19 -08:00
|
|
|
void commands_send_packet_nrf(unsigned char *data, unsigned int len);
|
2019-03-04 10:23:38 -08:00
|
|
|
void commands_send_packet_last_blocking(unsigned char *data, unsigned int len);
|
|
|
|
void commands_process_packet(unsigned char *data, unsigned int len,
|
|
|
|
void(*reply_func)(unsigned char *data, unsigned int len));
|
2017-09-04 12:12:43 -07:00
|
|
|
void commands_printf(const char* format, ...);
|
2014-09-19 18:22:38 -07:00
|
|
|
void commands_send_rotor_pos(float rotor_pos);
|
|
|
|
void commands_send_experiment_samples(float *samples, int len);
|
2015-12-27 16:50:23 -08:00
|
|
|
disp_pos_mode commands_get_disp_pos_mode(void);
|
2016-01-24 04:44:51 -08:00
|
|
|
void commands_set_app_data_handler(void(*func)(unsigned char *data, unsigned int len));
|
2016-02-24 12:17:39 -08:00
|
|
|
void commands_send_app_data(unsigned char *data, unsigned int len);
|
2019-02-18 10:30:19 -08:00
|
|
|
void commands_send_gpd_buffer_notify(void);
|
|
|
|
void commands_send_mcconf(COMM_PACKET_ID packet_id, mc_configuration *mcconf);
|
2016-11-04 07:18:34 -07:00
|
|
|
void commands_send_appconf(COMM_PACKET_ID packet_id, app_configuration *appconf);
|
2019-02-18 10:30:19 -08:00
|
|
|
void commands_apply_mcconf_hw_limits(mc_configuration *mcconf);
|
2014-09-19 18:22:38 -07:00
|
|
|
|
|
|
|
#endif /* COMMANDS_H_ */
|