busvoodoo_onewire: remove features unsupported by dongle
This commit is contained in:
parent
c35af16137
commit
41d4350220
|
@ -12,10 +12,10 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/** BusVoodoo 1-wire mode (code)
|
/** BusVoodoo 1-wire mode
|
||||||
* @file busvoodoo_onewire.c
|
* @file
|
||||||
* @author King Kévin <kingkevin@cuvoodoo.info>
|
* @author King Kévin <kingkevin@cuvoodoo.info>
|
||||||
* @date 2018
|
* @date 2018-2020
|
||||||
* @note peripherals used: timer @ref onewire_master_timer
|
* @note peripherals used: timer @ref onewire_master_timer
|
||||||
*/
|
*/
|
||||||
/* standard libraries */
|
/* standard libraries */
|
||||||
|
@ -34,7 +34,9 @@
|
||||||
#include "menu.h" // menu definitions
|
#include "menu.h" // menu definitions
|
||||||
#include "onewire_master.h" // 1-wire methods
|
#include "onewire_master.h" // 1-wire methods
|
||||||
#include "busvoodoo_global.h" // BusVoodoo definitions
|
#include "busvoodoo_global.h" // BusVoodoo definitions
|
||||||
|
#if BUSVOODOO_HARDWARE_VERSION != 2
|
||||||
#include "busvoodoo_oled.h" // OLED utilities
|
#include "busvoodoo_oled.h" // OLED utilities
|
||||||
|
#endif
|
||||||
#include "busvoodoo_onewire.h" // own definitions
|
#include "busvoodoo_onewire.h" // own definitions
|
||||||
|
|
||||||
/** mode setup stage */
|
/** mode setup stage */
|
||||||
|
@ -110,19 +112,21 @@ static bool busvoodoo_onewire_setup(char** prefix, const char* line)
|
||||||
busvoodoo_led_blue_off(); // disable blue LED because there is no activity
|
busvoodoo_led_blue_off(); // disable blue LED because there is no activity
|
||||||
busvoodoo_onewire_setting = BUSVOODOO_ONEWIRE_SETTING_NONE; // restart settings next time
|
busvoodoo_onewire_setting = BUSVOODOO_ONEWIRE_SETTING_NONE; // restart settings next time
|
||||||
*prefix = "1-Wire"; // display mode
|
*prefix = "1-Wire"; // display mode
|
||||||
busvoodoo_oled_text_left(*prefix); // set mode title on OLED display
|
|
||||||
const char* pinout_io[10] = {"GND", "5V", "3V3", "LV", NULL, "1WR", NULL, NULL, NULL, NULL}; // 1-wire mode pinout
|
const char* pinout_io[10] = {"GND", "5V", "3V3", "LV", NULL, "1WR", NULL, NULL, NULL, NULL}; // 1-wire mode pinout
|
||||||
for (uint8_t i=0; i<LENGTH(pinout_io) && i<LENGTH(busvoodoo_global_pinout_io); i++) {
|
for (uint8_t i=0; i<LENGTH(pinout_io) && i<LENGTH(busvoodoo_global_pinout_io); i++) {
|
||||||
busvoodoo_global_pinout_io[i] = pinout_io[i]; // set pin names
|
busvoodoo_global_pinout_io[i] = pinout_io[i]; // set pin names
|
||||||
}
|
}
|
||||||
|
#if BUSVOODOO_HARDWARE_VERSION != 2
|
||||||
if (busvoodoo_full) {
|
if (busvoodoo_full) {
|
||||||
const char* pinout_rscan[5] = {"HV", NULL, NULL, NULL, NULL}; // HiZ mode RS/CAN pinout
|
const char* pinout_rscan[5] = {"HV", NULL, NULL, NULL, NULL}; // HiZ mode RS/CAN pinout
|
||||||
for (uint8_t i=0; i<LENGTH(pinout_rscan) && i<LENGTH(busvoodoo_global_pinout_rscan); i++) {
|
for (uint8_t i=0; i<LENGTH(pinout_rscan) && i<LENGTH(busvoodoo_global_pinout_rscan); i++) {
|
||||||
busvoodoo_global_pinout_rscan[i] = pinout_rscan[i]; // set pin names
|
busvoodoo_global_pinout_rscan[i] = pinout_rscan[i]; // set pin names
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
busvoodoo_oled_text_left(*prefix); // set mode title on OLED display
|
||||||
busvoodoo_oled_text_pinout(pinout_io, true); // set pinout on display
|
busvoodoo_oled_text_pinout(pinout_io, true); // set pinout on display
|
||||||
busvoodoo_oled_update(); // update display to show text and pinout
|
busvoodoo_oled_update(); // update display to show text and pinout
|
||||||
|
#endif
|
||||||
complete = true; // configuration is complete
|
complete = true; // configuration is complete
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/** BusVoodoo 1-wire mode (API)
|
/** BusVoodoo 1-wire mode
|
||||||
* @file busvoodoo_onewire.h
|
* @file
|
||||||
* @author King Kévin <kingkevin@cuvoodoo.info>
|
* @author King Kévin <kingkevin@cuvoodoo.info>
|
||||||
* @date 2018
|
* @date 2018-2020
|
||||||
* @note peripherals used: timer @ref onewire_master_timer
|
* @note peripherals used: timer @ref onewire_master_timer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue