Commit 4af1509f authored by Rostislav Spinar's avatar Rostislav Spinar

Merge branch 'feature/kon-opi-02'

parents e23f5a93 cc10ad06
Subproject commit 8676afa165ba6c9ac7d386816b8994ab7ef4a68e
Subproject commit 94d4f97e97c82425fd4259fd31ee50a5e9a83150
Subproject commit c05adea89ce15e81c612822e2ce6f41b2281bda9
Subproject commit 87a2788d5bb5338793656cc46828dbfcec47661e
......@@ -412,10 +412,18 @@ namespace iqrf {
m_cfg.powerEnableGpioPin = POWER_ENABLE_GPIO;
m_cfg.busEnableGpioPin = BUS_ENABLE_GPIO;
m_cfg.pgmSwitchGpioPin = PGM_SWITCH_GPIO;
m_cfg.trModuleReset = TR_MODULE_RESET_ENABLE;
m_cfg.trModuleReset = TR_MODULE_RESET_DISABLE;
m_cfg.powerEnableGpioPin = (uint8_t)Pointer("/powerEnableGpioPin").GetWithDefault(d, (int)m_cfg.powerEnableGpioPin).GetInt();
m_cfg.busEnableGpioPin = (uint8_t)Pointer("/busEnableGpioPin").GetWithDefault(d, (int)m_cfg.busEnableGpioPin).GetInt();
// bus signal separated into more
if (m_cfg.busEnableGpioPin == -1) {
m_cfg.spiEnableGpioPin = (int8_t)Pointer("/spiEnableGpioPin").GetWithDefault(d, (int)m_cfg.spiEnableGpioPin).GetInt();
m_cfg.uartEnableGpioPin = (int8_t)Pointer("/uartEnableGpioPin").GetWithDefault(d, (int)m_cfg.uartEnableGpioPin).GetInt();
m_cfg.i2cEnableGpioPin = (int8_t)Pointer("/i2cEnableGpioPin").GetWithDefault(d, (int)m_cfg.i2cEnableGpioPin).GetInt();
}
m_cfg.pgmSwitchGpioPin = (uint8_t)Pointer("/pgmSwitchGpioPin").GetWithDefault(d, (int)m_cfg.pgmSwitchGpioPin).GetInt();
Value* v = Pointer("/spiReset").Get(d);
if (v && v->IsBool())
......
......@@ -348,9 +348,27 @@ namespace iqrf {
m_cfg.baudRate = get_baud(m_baudRate);
// default RPI mapping in include
m_cfg.powerEnableGpioPin = POWER_ENABLE_GPIO;
m_cfg.busEnableGpioPin = BUS_ENABLE_GPIO;
m_cfg.pgmSwitchGpioPin = PGM_SWITCH_GPIO;
m_cfg.trModuleReset = TR_MODULE_RESET_DISABLE;
m_cfg.powerEnableGpioPin = (uint8_t)Pointer("/powerEnableGpioPin").GetWithDefault(d, (int)m_cfg.powerEnableGpioPin).GetInt();
m_cfg.busEnableGpioPin = (uint8_t)Pointer("/busEnableGpioPin").GetWithDefault(d, (int)m_cfg.busEnableGpioPin).GetInt();
m_cfg.pgmSwitchGpioPin = -1;
// bus signal separated into more
if (m_cfg.busEnableGpioPin == -1) {
m_cfg.uartEnableGpioPin = (int8_t)Pointer("/uartEnableGpioPin").GetWithDefault(d, (int)m_cfg.uartEnableGpioPin).GetInt();
m_cfg.spiEnableGpioPin = (int8_t)Pointer("/spiEnableGpioPin").GetWithDefault(d, (int)m_cfg.spiEnableGpioPin).GetInt();
m_cfg.i2cEnableGpioPin = (int8_t)Pointer("/i2cEnableGpioPin").GetWithDefault(d, (int)m_cfg.i2cEnableGpioPin).GetInt();
}
m_cfg.pgmSwitchGpioPin = (uint8_t)Pointer("/pgmSwitchGpioPin").GetWithDefault(d, (int)m_cfg.pgmSwitchGpioPin).GetInt();
Value* v = Pointer("/uartReset").Get(d);
if (v && v->IsBool())
m_cfg.trModuleReset = v->GetBool() ? TR_MODULE_RESET_ENABLE : TR_MODULE_RESET_DISABLE;
TRC_INFORMATION(PAR(m_interfaceName) << PAR(m_baudRate));
......
{
"component": "iqrf::IqrfInfo",
"instance": "iqrf::IqrfInfo",
"enumAtStartUp": true,
"enumAtStartUp": false,
"enumPeriod": 1,
"enumUniformDpaVer": false
}
\ No newline at end of file
......@@ -2,8 +2,11 @@
"component": "iqrf::IqrfSpi",
"instance": "iqrf::IqrfSpi-/dev/spidev1.0",
"IqrfInterface": "/dev/spidev1.0",
"powerEnableGpioPin": 23,
"busEnableGpioPin": 7,
"pgmSwitchGpioPin": 22,
"powerEnableGpioPin": 19,
"busEnableGpioPin": -1,
"spiEnableGpioPin": 10,
"uartEnableGpioPin": 6,
"i2cEnableGpioPin": 7,
"pgmSwitchGpioPin": 3,
"spiReset": true
}
......@@ -2,6 +2,6 @@
"component": "iqrf::IqrfInfo",
"instance": "iqrf::IqrfInfo",
"enumAtStartUp": false,
"enumPeriod": 0,
"enumPeriod": 1,
"enumUniformDpaVer": false
}
\ No newline at end of file
{
"component": "iqrf::IqrfUart",
"instance": "iqrf::IqrfUart-/dev/ttyS0",
"IqrfInterface": "/dev/ttyS0",
"instance": "iqrf::IqrfUart-/dev/ttyS1",
"IqrfInterface": "/dev/ttyS1",
"baudRate": 57600,
"powerEnableGpioPin": 18,
"busEnableGpioPin": -1
"powerEnableGpioPin": 19,
"busEnableGpioPin": -1,
"uartEnableGpioPin": 6,
"spiEnableGpioPin": 10,
"i2cEnableGpioPin": 7,
"pgmSwitchGpioPin": -1,
"uartReset": true
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment