Repo unification
This commit is contained in:
47
firmware/tests/mock_board/mock_board_odout.c
Normal file
47
firmware/tests/mock_board/mock_board_odout.c
Normal file
@@ -0,0 +1,47 @@
|
||||
#include "mock_board_odout.h"
|
||||
|
||||
#define ODOUT_CH_CNT 7
|
||||
static uint8_t odout_ch = 0;
|
||||
static int8_t odout_data[ODOUT_CH_CNT];
|
||||
static uint8_t common_pwm = 0;
|
||||
|
||||
void bsp_odout_write(uint8_t ch, int8_t lvl)
|
||||
{
|
||||
if(ch < ODOUT_CH_CNT) odout_data[ch] = lvl;
|
||||
odout_ch = ch;
|
||||
}
|
||||
|
||||
void bsp_odout_write_common(uint8_t percent)
|
||||
{
|
||||
common_pwm = percent;
|
||||
}
|
||||
|
||||
uint8_t mock_board_odout_read_ch(void)
|
||||
{
|
||||
return odout_ch;
|
||||
}
|
||||
|
||||
void mock_board_odout_write_ch(uint8_t ch)
|
||||
{
|
||||
odout_ch = ch;
|
||||
}
|
||||
|
||||
int8_t mock_board_odout_read_data(uint8_t ch)
|
||||
{
|
||||
return odout_data[ch];
|
||||
}
|
||||
|
||||
void mock_board_odout_write_data(uint8_t ch, int8_t lvl)
|
||||
{
|
||||
odout_data[ch] = lvl;
|
||||
}
|
||||
|
||||
uint8_t mock_board_odout_read_pwm(void)
|
||||
{
|
||||
return common_pwm;
|
||||
}
|
||||
|
||||
void mock_board_odout_write_pwm(uint8_t percent)
|
||||
{
|
||||
common_pwm = percent;
|
||||
}
|
||||
Reference in New Issue
Block a user