2014-08-29 07:52:33 -07:00
|
|
|
/**
|
|
|
|
* @file tunerstudio.h
|
|
|
|
*
|
|
|
|
* @date Aug 26, 2013
|
2015-01-12 15:04:10 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2015
|
2014-08-29 07:52:33 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TUNERSTUDIO_H_
|
|
|
|
#define TUNERSTUDIO_H_
|
|
|
|
|
2014-12-24 10:05:36 -08:00
|
|
|
#include "main.h"
|
|
|
|
|
|
|
|
#if EFI_TUNER_STUDIO
|
2014-08-29 07:52:33 -07:00
|
|
|
#include "tunerstudio_configuration.h"
|
2014-10-21 09:04:13 -07:00
|
|
|
#include "engine.h"
|
|
|
|
|
2015-02-27 14:07:50 -08:00
|
|
|
void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ENGINE_PARAMETER_S);
|
2015-01-28 09:04:30 -08:00
|
|
|
void printTsStats(void);
|
2015-02-19 06:04:18 -08:00
|
|
|
void requestBurn(void);
|
2014-10-21 09:04:13 -07:00
|
|
|
|
2015-01-14 16:03:39 -08:00
|
|
|
void startTunerStudioConnectivity(Logging *sharedLogger);
|
2014-08-29 07:52:33 -07:00
|
|
|
void syncTunerStudioCopy(void);
|
|
|
|
void tunerStudioWriteCrcPacket(const uint8_t command, const void *buf, const uint16_t size);
|
|
|
|
|
|
|
|
#if defined __GNUC__
|
|
|
|
// GCC
|
|
|
|
#define pre_packed
|
|
|
|
#define post_packed __attribute__((packed))
|
|
|
|
#else
|
|
|
|
// IAR
|
|
|
|
#define pre_packed __packed
|
|
|
|
#define post_packed
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef pre_packed struct
|
|
|
|
post_packed {
|
|
|
|
short int offset;
|
|
|
|
short int count;
|
|
|
|
} TunerStudioWriteChunkRequest;
|
|
|
|
|
|
|
|
typedef pre_packed struct
|
|
|
|
post_packed {
|
|
|
|
short int page;
|
|
|
|
short int offset;
|
|
|
|
short int count;
|
|
|
|
} TunerStudioReadRequest;
|
|
|
|
|
|
|
|
typedef pre_packed struct
|
|
|
|
post_packed {
|
|
|
|
short int offset;
|
|
|
|
unsigned char value;
|
|
|
|
} TunerStudioWriteValueRequest;
|
|
|
|
|
2014-12-24 10:05:36 -08:00
|
|
|
#endif /* EFI_TUNER_STUDIO */
|
|
|
|
|
2014-08-29 07:52:33 -07:00
|
|
|
#endif /* TUNERSTUDIO_H_ */
|