esp32-warm-water
esp32 based project for the control of a heating element based on temperature
Macros | Functions
owb_rmt.c File Reference
#include "owb.h"
#include "driver/rmt.h"
#include "driver/gpio.h"
#include "sdkconfig.h"
#include "esp_log.h"
Include dependency graph for owb_rmt.c:

Go to the source code of this file.

Macros

#define OW_DURATION_RESET   480
 
#define OW_DURATION_SLOT   75
 
#define OW_DURATION_1_LOW   2
 
#define OW_DURATION_1_HIGH   (OW_DURATION_SLOT - OW_DURATION_1_LOW)
 
#define OW_DURATION_0_LOW   65
 
#define OW_DURATION_0_HIGH   (OW_DURATION_SLOT - OW_DURATION_0_LOW)
 
#define OW_DURATION_SAMPLE   (15 - 2)
 
#define OW_DURATION_RX_IDLE   (OW_DURATION_SLOT + 2)
 
#define MAX_BITS_PER_SLOT   (8)
 
#define info_of_driver(owb)   container_of(owb, owb_rmt_driver_info, bus)
 

Functions

OneWireBusowb_rmt_initialize (owb_rmt_driver_info *info, gpio_num_t gpio_num, rmt_channel_t tx_channel, rmt_channel_t rx_channel)
 Initialise the RMT driver. More...
 

Macro Definition Documentation

◆ info_of_driver

#define info_of_driver (   owb)    container_of(owb, owb_rmt_driver_info, bus)

Definition at line 89 of file owb_rmt.c.

◆ MAX_BITS_PER_SLOT

#define MAX_BITS_PER_SLOT   (8)

Definition at line 85 of file owb_rmt.c.

◆ OW_DURATION_0_HIGH

#define OW_DURATION_0_HIGH   (OW_DURATION_SLOT - OW_DURATION_0_LOW)

Definition at line 77 of file owb_rmt.c.

◆ OW_DURATION_0_LOW

#define OW_DURATION_0_LOW   65

Definition at line 76 of file owb_rmt.c.

◆ OW_DURATION_1_HIGH

#define OW_DURATION_1_HIGH   (OW_DURATION_SLOT - OW_DURATION_1_LOW)

Definition at line 74 of file owb_rmt.c.

◆ OW_DURATION_1_LOW

#define OW_DURATION_1_LOW   2

Definition at line 73 of file owb_rmt.c.

◆ OW_DURATION_RESET

#define OW_DURATION_RESET   480

Definition at line 69 of file owb_rmt.c.

◆ OW_DURATION_RX_IDLE

#define OW_DURATION_RX_IDLE   (OW_DURATION_SLOT + 2)

Definition at line 82 of file owb_rmt.c.

◆ OW_DURATION_SAMPLE

#define OW_DURATION_SAMPLE   (15 - 2)

Definition at line 79 of file owb_rmt.c.

◆ OW_DURATION_SLOT

#define OW_DURATION_SLOT   75

Definition at line 71 of file owb_rmt.c.

Function Documentation

◆ owb_rmt_initialize()

OneWireBus* owb_rmt_initialize ( owb_rmt_driver_info info,
gpio_num_t  gpio_num,
rmt_channel_t  tx_channel,
rmt_channel_t  rx_channel 
)

Initialise the RMT driver.

Parameters
[in]infoPointer to an uninitialized owb_rmt_driver_info structure. Note: the structure must remain in scope for the lifetime of this component.
[in]gpio_numThe GPIO number to use as the One Wire bus data line.
[in]tx_channelThe RMT channel to use for transmitting data to bus devices.
[in]rx_channelthe RMT channel to use for receiving data from bus devices.
Returns
OneWireBus *, pass this into the other OneWireBus public API functions

Definition at line 453 of file owb_rmt.c.

Here is the caller graph for this function: