components/esp32-owb/include/owb_rmt_bus_symbols.h

Wed, 04 Oct 2023 11:28:49 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 04 Oct 2023 11:28:49 +0200
changeset 80
715785443a95
parent 72
acc1904cd70d
permissions
-rw-r--r--

Version 0.3.1. Remove obsolete files from spiffs filesystem. Removed obsolete wifi stations.conf file and functions. Removed obsolete user screens.

/**
 * Copyright (c) 2023 mjcross
 *
 * SPDX-License-Identifier: MIT
**/

#include "owb_rmt_bus_timings.h"

// RMT transmit channel symbols for the onewire bus signals and conditions
//

// basic bus levels
// ----------------
// note: we configure the transmit channel to be hardware inverted,
//       so that the bus initialises in the 'released' state
#define OWB_RMT_BUS_ASSERTED 1
#define OWB_RMT_BUS_RELEASED 0

// bus symbols as `rmt_symbol_word_t`
// ----------------------------------

// send 'zero' bit
#define OWB_RMT_SYMBOL_0BIT { \
    .level0 = OWB_RMT_BUS_ASSERTED, \
    .duration0 = OWB_TIMING_PARAM_C, \
    .level1 = OWB_RMT_BUS_RELEASED, \
    .duration1 = OWB_TIMING_PARAM_D }

// send 'one' bit
#define OWB_RMT_SYMBOL_1BIT { \
    .level0 = OWB_RMT_BUS_ASSERTED, \
    .duration0 = OWB_TIMING_PARAM_A, \
    .level1 = OWB_RMT_BUS_RELEASED, \
    .duration1 = OWB_TIMING_PARAM_B }

// send bus reset 
#define OWB_RMT_SYMBOL_RESET { \
    .level0 = OWB_RMT_BUS_ASSERTED, \
    .duration0 = OWB_TIMING_PARAM_H, \
    .level1 = OWB_RMT_BUS_RELEASED, \
    .duration1 = OWB_TIMING_PARAM_I + OWB_TIMING_PARAM_J }

mercurial