Repo unification
This commit is contained in:
31
firmware/tests/mock_board/mock_board_dout.c
Normal file
31
firmware/tests/mock_board/mock_board_dout.c
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "mock_board_dout.h"
|
||||
|
||||
#define DOUT_CH_CNT 7
|
||||
static uint8_t dout_ch = 0;
|
||||
static int8_t dout_data[DOUT_CH_CNT];
|
||||
|
||||
void bsp_dout_write(uint8_t ch, int8_t lvl)
|
||||
{
|
||||
if(ch < DOUT_CH_CNT) dout_data[ch] = lvl;
|
||||
dout_ch = ch;
|
||||
}
|
||||
|
||||
uint8_t mock_board_dout_read_ch(void)
|
||||
{
|
||||
return dout_ch;
|
||||
}
|
||||
|
||||
void mock_board_dout_write_ch(uint8_t ch)
|
||||
{
|
||||
dout_ch = ch;
|
||||
}
|
||||
|
||||
int8_t mock_board_dout_read_data(uint8_t ch)
|
||||
{
|
||||
return dout_data[ch];
|
||||
}
|
||||
|
||||
void mock_board_dout_write_data(uint8_t ch, int8_t lvl)
|
||||
{
|
||||
dout_data[ch] = lvl;
|
||||
}
|
||||
Reference in New Issue
Block a user