Skip to content

Commit

Permalink
iButton port issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
quen0n committed Apr 29, 2023
1 parent 1e8e2d3 commit 61b727d
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions Sensors.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const GpioPin SWC_10 = {.pin = LL_GPIO_PIN_14, .port = GPIOA};
const GpioPin SIO_12 = {.pin = LL_GPIO_PIN_13, .port = GPIOA};
const GpioPin TX_13 = {.pin = LL_GPIO_PIN_6, .port = GPIOB};
const GpioPin RX_14 = {.pin = LL_GPIO_PIN_7, .port = GPIOB};
const GpioPin ibutton_gpio = {.pin = LL_GPIO_PIN_14, .port = GPIOB};

//Количество доступных портов ввода/вывода
#define GPIO_ITEMS (sizeof(GPIOList) / sizeof(GPIO))
Expand Down Expand Up @@ -75,27 +76,10 @@ const Interface SPI = {
//Перечень интерфейсов подключения
//static const Interface* interfaces[] = {&SINGLE_WIRE, &I2C, &ONE_WIRE, &SPI};
//Перечень датчиков
static const SensorType* sensorTypes[] = {
&DHT11,
&DHT12_SW,
&DHT20,
&DHT21,
&DHT22,
&Dallas,
&AM2320_SW,
&AM2320_I2C,
&HTU21x,
&AHT10,
&SHT30,
&GXHT30,
&LM75,
&HDC1080,
&BMP180,
&BMP280,
&BME280,
&BME680,
&MAX31855,
&MAX6675};
static const SensorType* sensorTypes[] = {&DHT11, &DHT12_SW, &DHT20, &DHT21, &DHT22,
&Dallas, &AM2320_SW, &AM2320_I2C, &HTU21x, &AHT10,
&SHT30, &GXHT30, &LM75, &HDC1080, &BMP180,
&BMP280, &BME280, &BME680, &MAX31855, &MAX6675};

const SensorType* unitemp_sensors_getTypeFromInt(uint8_t index) {
if(index > SENSOR_TYPES_COUNT) return NULL;
Expand Down

0 comments on commit 61b727d

Please sign in to comment.