Files
wideband/firmware/console/binary/tunerstudio.h
rusefillc 8646d10067 OpenBLT reset functionality (#259)
* ts: support reset and reset to OpenBLT commands

(cherry picked from commit 2f2fca401d7dc9a29e806013efec4d41570dd613)

* f1_xxx: ini: reset commands

(cherry picked from commit 628994ba0a70901edb9b59360646aa195b3307cf)

* typo

* f1_xxx: ini: update signature

(cherry picked from commit 7aa57fe09c6c684855838e36c9b65d8ae3618a7a)

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-06-11 12:51:41 -07:00

61 lines
1.3 KiB
C++

/**
* @file tunerstudio.h
*
* @date Aug 26, 2013
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#pragma once
#include "tunerstudio_io.h"
#include "thread_controller.h"
typedef struct {
int queryCommandCounter;
int outputChannelsCommandCounter;
int readPageCommandsCounter;
int burnCommandCounter;
int crc32CheckCommandCounter;
int writeChunkCommandCounter;
int errorCounter;
int totalCounter;
int textCommandCounter;
int testCommandCounter;
} tunerstudio_counters_s;
void tunerStudioDebug(TsChannelBase* tsChannel, const char *msg);
void tunerStudioError(TsChannelBase* tsChannel, const char *msg);
uint8_t* getWorkingPageAddr();
void startTunerStudioConnectivity(void);
typedef struct {
uint8_t cmd;
uint16_t subsystem;
uint16_t index;
} __attribute__((packed)) TunerStudioCmdPacketHeader;
typedef struct {
uint8_t cmd;
uint16_t page;
uint16_t offset;
uint16_t count;
} __attribute__((packed)) TunerStudioDataPacketHeader;
#define CONNECTIVITY_THREAD_STACK (512)
#define CONNECTIVITY_THREAD_PRIO (NORMALPRIO + 1)
class TunerstudioThread : public ThreadController<CONNECTIVITY_THREAD_STACK> {
public:
TunerstudioThread(const char* name)
: ThreadController(name, CONNECTIVITY_THREAD_PRIO)
{
}
// Initialize and return the channel to use for this thread.
virtual TsChannelBase* setupChannel() = 0;
void ThreadTask() override;
};