void sht_init(void) { printf("sht init\n"); gpio_pin_high(0, SHT_SDA); gpio_pin_set_direction(0, SHT_SDA, BOOL_TRUE); gpio_pin_high(0, SHT_SCL); gpio_pin_set_direction(0, SHT_SCL, BOOL_TRUE); }
int main() { gpio_pin_fsel(47, GPIO_FSEL_OUTPUT); while (1) { delay(); gpio_pin_high(47); delay(); gpio_pin_low(47); } return 0; }
static void scl_high(void) { gpio_pin_high(0, SHT_SCL); wait(); }