2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file fsio_impl.h
|
|
|
|
* @brief FSIO as it's used for GPIO
|
|
|
|
*
|
|
|
|
* @date Oct 5, 2014
|
2017-01-03 03:05:22 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2017
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LE_FUNCTIONS_H_
|
|
|
|
#define LE_FUNCTIONS_H_
|
|
|
|
|
|
|
|
#include "fsio_core.h"
|
|
|
|
#include "engine.h"
|
2016-04-04 07:01:43 -07:00
|
|
|
#include "table_helper.h"
|
2017-01-19 14:04:15 -08:00
|
|
|
#include "system_fsio.h"
|
2016-04-04 07:01:43 -07:00
|
|
|
|
2016-06-29 22:01:38 -07:00
|
|
|
typedef Map3D<FSIO_TABLE_8, FSIO_TABLE_8, float> fsio8_Map3D_f32t;
|
|
|
|
typedef Map3D<FSIO_TABLE_8, FSIO_TABLE_8, uint8_t> fsio8_Map3D_u8t;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-01-19 19:09:37 -08:00
|
|
|
#define MAGIC_OFFSET_FOR_ENGINE_WARNING 4
|
|
|
|
#define MAGIC_OFFSET_FOR_CRITICAL_ENGINE 5
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2017-06-04 12:25:37 -07:00
|
|
|
float getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX);
|
2019-05-03 15:41:43 -07:00
|
|
|
void setFsio(int index, brain_pin_e pin, const char * exp DECLARE_CONFIG_PARAMETER_SUFFIX);
|
|
|
|
void setFsioExt(int index, brain_pin_e pin, const char * exp, int pwmFrequency DECLARE_CONFIG_PARAMETER_SUFFIX);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2017-05-15 20:33:22 -07:00
|
|
|
void initFsioImpl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
2017-12-16 21:03:26 -08:00
|
|
|
void runFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|
|
|
float getFsioOutputValue(int index DECLARE_ENGINE_PARAMETER_SUFFIX);
|
2017-05-15 20:33:22 -07:00
|
|
|
void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
2018-02-03 08:42:50 -08:00
|
|
|
void onConfigurationChangeFsioCallback(engine_configuration_s *previousConfiguration DECLARE_ENGINE_PARAMETER_SUFFIX);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
#endif /* LE_FUNCTIONS_H_ */
|