bi2a: Clarify data field usage on init command

The single byte is a specific parameter required to initialize
the IO correctly. Otherwise, it either will only work partially
or not worked at all. The full impact and meaning of that byte
is not entirely known, yet.
This commit is contained in:
icex2
2020-12-20 15:25:16 +01:00
parent 0c88518a1f
commit ef377f40d8
4 changed files with 9 additions and 4 deletions
+3 -1
View File
@@ -9,6 +9,8 @@
#include "util/log.h"
static const uint8_t _BIO2DR_BI2A_IIDX_INIT_DATA = 0x3B;
static bool bio2drv_bi2a_iidx_init_io(uint8_t node_id)
{
struct ac_io_message msg;
@@ -16,7 +18,7 @@ static bool bio2drv_bi2a_iidx_init_io(uint8_t node_id)
msg.addr = node_id + 1;
msg.cmd.code = ac_io_u16(BIO2_BI2A_CMD_INIT);
msg.cmd.nbytes = 1;
msg.cmd.count = 0x3B;
msg.cmd.param = _BIO2DR_BI2A_IIDX_INIT_DATA;
if (!aciodrv_send_and_recv(
&msg, offsetof(struct ac_io_message, cmd.raw) + 1)) {
+3 -1
View File
@@ -9,6 +9,8 @@
#include "util/log.h"
static const uint8_t _BIO2DR_BI2A_SDVX_INIT_DATA = 0x3B;
// this is probably InitIO
static bool bio2drv_bi2a_sdvx_init_io(uint8_t node_id)
{
@@ -17,7 +19,7 @@ static bool bio2drv_bi2a_sdvx_init_io(uint8_t node_id)
msg.addr = node_id + 1;
msg.cmd.code = ac_io_u16(BIO2_BI2A_CMD_INIT);
msg.cmd.nbytes = 1;
msg.cmd.count = 0x3B;
msg.cmd.param = _BIO2DR_BI2A_SDVX_INIT_DATA;
if (!aciodrv_send_and_recv(
&msg, offsetof(struct ac_io_message, cmd.raw) + 1)) {