#ifndef __ONE_WIRE_IMPL_LL_H
#define __ONE_WIRE_IMPL_LL_H

#include "stm32f1xx_hal.h"
#include "stm32f1xx_ll_gpio.h"
#include "stm32f1xx_ll_rcc.h"


#include "one_wire.h"

typedef struct {
    GPIO_TypeDef *GPIOx;
    uint32_t PinMask;
} onewire_impl_ll_t;

onewire_ret_t ow_impl_delay_us(onewire_impl_ll_t *impl, uint32_t usec);
onewire_ret_t ow_impl_drive_dq(onewire_impl_ll_t *impl, uint8_t value);
uint8_t ow_impl_read_dq(onewire_impl_ll_t *impl);

#endif