├── component.mk ├── doc ├── .gitignore └── Doxyfile ├── CMakeLists.txt ├── library.json ├── .travis.yml ├── LICENSE ├── include ├── owb_gpio.h ├── owb_rmt.h └── owb.h ├── README.md ├── owb_gpio.c ├── owb_rmt.c └── owb.c /component.mk: -------------------------------------------------------------------------------- 1 | # Use defaults. 2 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | html/ 2 | latex/ 3 | 4 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(COMPONENT_ADD_INCLUDEDIRS include) 2 | set(COMPONENT_SRCS "owb.c" "owb_gpio.c" "owb_rmt.c") 3 | set(COMPONENT_REQUIRES "soc" "driver" "esp_rom") 4 | register_component() 5 | -------------------------------------------------------------------------------- /library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "esp32-owb", 3 | "keywords": "onewire, 1-wire, bus, sensor, temperature", 4 | "description": "ESP32-compatible C component for the Maxim Integrated 1-Wire protocol.", 5 | "repository": 6 | { 7 | "type": "git", 8 | "url": "https://github.com/DavidAntliff/esp32-owb.git" 9 | }, 10 | "authors": 11 | [ 12 | { 13 | "name": "David Antliff", 14 | "url": "https://github.com/DavidAntliff", 15 | "maintainer": true 16 | }, 17 | { 18 | "name": "Chris Morgan", 19 | "url": "https://github.com/chmorgan" 20 | } 21 | ], 22 | "version": "0.1", 23 | "frameworks": "espidf", 24 | "platforms": "espressif32", 25 | "build": { 26 | "flags": [ 27 | "-I include/" 28 | ] 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Build and deploy doxygen documention to GitHub Pages 2 | sudo: false 3 | dist: trusty 4 | 5 | # Blacklist 6 | branches: 7 | only: 8 | - master 9 | 10 | # Environment variables 11 | env: 12 | global: 13 | - GH_REPO_REF: github.com/DavidAntliff/esp32-owb.git 14 | 15 | # Install dependencies 16 | addons: 17 | apt: 18 | packages: 19 | - doxygen 20 | - doxygen-doc 21 | - doxygen-latex 22 | - doxygen-gui 23 | - graphviz 24 | 25 | # Build the docs 26 | script: 27 | - cd doc 28 | - doxygen 29 | 30 | # Deploy using Travis-CI/GitHub Pages integration support 31 | deploy: 32 | provider: pages 33 | skip-cleanup: true 34 | local-dir: doc/html 35 | github-token: $GITHUB_TOKEN 36 | on: 37 | branch: master 38 | target-branch: gh-pages 39 | 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 David Antliff 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /include/owb_gpio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2017 David Antliff 5 | * Copyright (c) 2017 Chris Morgan 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | */ 25 | 26 | /** 27 | * @file 28 | * @brief Interface definitions for the ESP32 GPIO driver used to communicate with devices 29 | * on the One Wire Bus. 30 | * 31 | * @deprecated 32 | * This driver is deprecated and may be removed at some stage. It is not recommended for use 33 | * due to issues with imprecise timing. 34 | */ 35 | 36 | #pragma once 37 | #ifndef OWB_GPIO_H 38 | #define OWB_GPIO_H 39 | 40 | #include "owb.h" 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | /** 47 | * @brief GPIO driver information 48 | */ 49 | typedef struct 50 | { 51 | int gpio; ///< Value of the GPIO connected to the 1-Wire bus 52 | OneWireBus bus; ///< OneWireBus instance 53 | } owb_gpio_driver_info; 54 | 55 | /** 56 | * @brief Initialise the GPIO driver. 57 | * @return OneWireBus*, pass this into the other OneWireBus public API functions 58 | */ 59 | OneWireBus * owb_gpio_initialize(owb_gpio_driver_info *driver_info, int gpio); 60 | 61 | /** 62 | * @brief Clean up after a call to owb_gpio_initialize() 63 | */ 64 | void owb_gpio_uninitialize(owb_gpio_driver_info *driver_info); 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif // OWB_GPIO_H 71 | -------------------------------------------------------------------------------- /include/owb_rmt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2017 David Antliff 5 | * Copyright (c) 2017 Chris Morgan 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | */ 25 | 26 | /** 27 | * @file 28 | * @brief Interface definitions for ESP32 RMT driver used to communicate with devices 29 | * on the One Wire Bus. 30 | * 31 | * This is the recommended driver. 32 | */ 33 | 34 | #pragma once 35 | #ifndef OWB_RMT_H 36 | #define OWB_RMT_H 37 | 38 | #include "freertos/FreeRTOS.h" 39 | #include "freertos/queue.h" 40 | #include "freertos/ringbuf.h" 41 | #include "driver/rmt.h" 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /** 48 | * @brief RMT driver information 49 | */ 50 | typedef struct 51 | { 52 | int tx_channel; ///< RMT channel to use for TX 53 | int rx_channel; ///< RMT channel to use for RX 54 | RingbufHandle_t rb; ///< Ring buffer handle 55 | int gpio; ///< OneWireBus GPIO 56 | OneWireBus bus; ///< OneWireBus instance 57 | } owb_rmt_driver_info; 58 | 59 | /** 60 | * @brief Initialise the RMT driver. 61 | * @param[in] info Pointer to an uninitialized owb_rmt_driver_info structure. 62 | * Note: the structure must remain in scope for the lifetime of this component. 63 | * @param[in] gpio_num The GPIO number to use as the One Wire bus data line. 64 | * @param[in] tx_channel The RMT channel to use for transmitting data to bus devices. 65 | * @param[in] rx_channel the RMT channel to use for receiving data from bus devices. 66 | * @return OneWireBus *, pass this into the other OneWireBus public API functions 67 | */ 68 | OneWireBus* owb_rmt_initialize(owb_rmt_driver_info * info, gpio_num_t gpio_num, 69 | rmt_channel_t tx_channel, rmt_channel_t rx_channel); 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif // OWB_RMT_H 76 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # esp32-owb 2 | 3 | This is a ESP32-compatible C component for the Maxim Integrated "1-Wire" protocol. 4 | 5 | It is written for the `idf.py` target `esp32`, although it may work on other ESP-32 devices with minor modifications. 6 | 7 | It is tested for version 4.4.4 and 5.0.1 of the [ESP-IDF](https://github.com/espressif/esp-idf) environment. 8 | 9 | Legacy support for v2.1 is available on the [ESP-IDF_v2.1](https://github.com/DavidAntliff/esp32-owb/tree/ESP-IDF_v2.1) branch. This is no longer maintained. 10 | 11 | Legacy support for v3.0-v3.3 and v4.1-beta1 is available on the [ESP-IDF_v3.0-3.3_4.1-beta1](https://github.com/DavidAntliff/esp32-owb/tree/ESP-IDF_v3.0-3.3_4.1-beta1) branch. This is no longer maintained. 12 | 13 | ## Features 14 | 15 | This library includes: 16 | 17 | * External power supply mode. 18 | * Parasitic power mode. 19 | * Static (stack-based) or dynamic (malloc-based) memory model. 20 | * No globals - support any number of 1-Wire buses simultaneously. 21 | * 1-Wire device detection and validation, including search for multiple devices on a single bus. 22 | * Addressing optimisation for a single (solo) device on a bus. 23 | * 1-Wire bus operations including multi-byte read and write operations. 24 | * CRC checks on ROM code. 25 | 26 | This component includes two methods of bus access - delay-driven GPIO and RMT-driven slots. 27 | The original implementation used CPU delays to construct the 1-Wire read/write timeslots 28 | however this proved to be too unreliable. A second method, using the ESP32's RMT peripheral, 29 | results in very accurate read/write timeslots and more reliable operation. 30 | 31 | Therefore I highly recommend that you use the RMT driver. *The GPIO driver is deprecated and will be removed.* 32 | 33 | See documentation for [esp32-ds18b20](https://www.github.com/DavidAntliff/esp32-ds18b20#parasitic-power-mode) 34 | for further information about parasitic power mode, including strong pull-up configuration. 35 | 36 | ## Documentation 37 | 38 | Automatically generated API documentation (doxygen) is available [here](https://davidantliff.github.io/esp32-owb/index.html). 39 | 40 | ## Source Code 41 | 42 | The source is available from [GitHub](https://www.github.com/DavidAntliff/esp32-owb). 43 | 44 | ## License 45 | 46 | The code in this project is licensed under the MIT license - see LICENSE for details. 47 | 48 | ## Links 49 | 50 | * [esp32-ds18b20](https://github.com/DavidAntliff/esp32-ds18b20) - ESP32-compatible DS18B20 Digital Thermometer 51 | component for ESP32 52 | * [1-Wire Communication Through Software](https://www.maximintegrated.com/en/app-notes/index.mvp/id/126) 53 | * [1-Wire Search Algorithm](https://www.maximintegrated.com/en/app-notes/index.mvp/id/187) 54 | * [Espressif IoT Development Framework for ESP32](https://github.com/espressif/esp-idf) 55 | 56 | ## Acknowledgements 57 | 58 | Thank you to [Chris Morgan](https://github.com/chmorgan) for his contribution of adding RMT peripheral support for more 59 | reliable operation. 60 | 61 | Parts of this code are based on references provided to the public domain by Maxim Integrated. 62 | 63 | "1-Wire" is a registered trademark of Maxim Integrated. 64 | -------------------------------------------------------------------------------- /owb_gpio.c: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2017 David Antliff 5 | * Copyright (c) 2017 Chris Morgan 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | */ 25 | 26 | /** 27 | * @file 28 | */ 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #include "freertos/FreeRTOS.h" 37 | #include "freertos/task.h" 38 | #include "esp_log.h" 39 | #include "sdkconfig.h" 40 | #include "driver/gpio.h" 41 | #include "rom/ets_sys.h" // for ets_delay_us() 42 | #include "rom/gpio.h" // for gpio_pad_select_gpio() 43 | 44 | #include "owb.h" 45 | #include "owb_gpio.h" 46 | 47 | static const char * TAG = "owb_gpio"; 48 | 49 | // Define PHY_DEBUG to enable GPIO output around when the bus is sampled 50 | // by the master (this library). This GPIO output makes it possible to 51 | // validate the master's sampling using an oscilloscope. 52 | // 53 | // For the debug GPIO the idle state is low and made high before the 1-wire sample 54 | // point and low again after the sample point 55 | #undef PHY_DEBUG 56 | 57 | #ifdef PHY_DEBUG 58 | // Update these defines to a pin that you can access 59 | #define PHY_DEBUG_GPIO GPIO_NUM_27 60 | #define PHY_DEBUG_GPIO_MASK GPIO_SEL_27 61 | #endif 62 | 63 | /// @cond ignore 64 | struct _OneWireBus_Timing 65 | { 66 | uint32_t A, B, C, D, E, F, G, H, I, J; 67 | }; 68 | /// @endcond 69 | 70 | // 1-Wire timing delays (standard) in microseconds. 71 | // Labels and values are from https://www.maximintegrated.com/en/app-notes/index.mvp/id/126 72 | static const struct _OneWireBus_Timing _StandardTiming = { 73 | 6, // A - read/write "1" master pull DQ low duration 74 | 64, // B - write "0" master pull DQ low duration 75 | 60, // C - write "1" master pull DQ high duration 76 | 10, // D - write "0" master pull DQ high duration 77 | 9, // E - read master pull DQ high duration 78 | 55, // F - complete read timeslot + 10ms recovery 79 | 0, // G - wait before reset 80 | 480, // H - master pull DQ low duration 81 | 70, // I - master pull DQ high duration 82 | 410, // J - complete presence timeslot + recovery 83 | }; 84 | 85 | static void _us_delay(uint32_t time_us) 86 | { 87 | ets_delay_us(time_us); 88 | } 89 | 90 | /// @cond ignore 91 | #define info_from_bus(owb) container_of(owb, owb_gpio_driver_info, bus) 92 | /// @endcond 93 | 94 | /** 95 | * @brief Generate a 1-Wire reset (initialization). 96 | * @param[in] bus Initialised bus instance. 97 | * @param[out] is_present true if device is present, otherwise false. 98 | * @return status 99 | */ 100 | static owb_status _reset(const OneWireBus * bus, bool * is_present) 101 | { 102 | bool present = false; 103 | portMUX_TYPE timeCriticalMutex = portMUX_INITIALIZER_UNLOCKED; 104 | portENTER_CRITICAL(&timeCriticalMutex); 105 | 106 | owb_gpio_driver_info *i = info_from_bus(bus); 107 | 108 | gpio_set_direction(i->gpio, GPIO_MODE_OUTPUT); 109 | _us_delay(bus->timing->G); 110 | gpio_set_level(i->gpio, 0); // Drive DQ low 111 | _us_delay(bus->timing->H); 112 | gpio_set_direction(i->gpio, GPIO_MODE_INPUT); // Release the bus 113 | gpio_set_level(i->gpio, 1); // Reset the output level for the next output 114 | _us_delay(bus->timing->I); 115 | 116 | #ifdef PHY_DEBUG 117 | gpio_set_level(PHY_DEBUG_GPIO, 1); 118 | #endif 119 | 120 | int level1 = gpio_get_level(i->gpio); 121 | 122 | #ifdef PHY_DEBUG 123 | gpio_set_level(PHY_DEBUG_GPIO, 0); 124 | #endif 125 | 126 | _us_delay(bus->timing->J); // Complete the reset sequence recovery 127 | 128 | #ifdef PHY_DEBUG 129 | gpio_set_level(PHY_DEBUG_GPIO, 1); 130 | #endif 131 | 132 | int level2 = gpio_get_level(i->gpio); 133 | 134 | #ifdef PHY_DEBUG 135 | gpio_set_level(PHY_DEBUG_GPIO, 0); 136 | #endif 137 | 138 | portEXIT_CRITICAL(&timeCriticalMutex); 139 | 140 | present = (level1 == 0) && (level2 == 1); // Sample for presence pulse from slave 141 | ESP_LOGD(TAG, "reset: level1 0x%x, level2 0x%x, present %d", level1, level2, present); 142 | 143 | *is_present = present; 144 | 145 | return OWB_STATUS_OK; 146 | } 147 | 148 | /** 149 | * @brief Send a 1-Wire write bit, with recovery time. 150 | * @param[in] bus Initialised bus instance. 151 | * @param[in] bit The value to send. 152 | */ 153 | static void _write_bit(const OneWireBus * bus, int bit) 154 | { 155 | int delay1 = bit ? bus->timing->A : bus->timing->C; 156 | int delay2 = bit ? bus->timing->B : bus->timing->D; 157 | owb_gpio_driver_info *i = info_from_bus(bus); 158 | 159 | portMUX_TYPE timeCriticalMutex = portMUX_INITIALIZER_UNLOCKED; 160 | portENTER_CRITICAL(&timeCriticalMutex); 161 | 162 | gpio_set_direction(i->gpio, GPIO_MODE_OUTPUT); 163 | gpio_set_level(i->gpio, 0); // Drive DQ low 164 | _us_delay(delay1); 165 | gpio_set_level(i->gpio, 1); // Release the bus 166 | _us_delay(delay2); 167 | 168 | portEXIT_CRITICAL(&timeCriticalMutex); 169 | } 170 | 171 | /** 172 | * @brief Read a bit from the 1-Wire bus and return the value, with recovery time. 173 | * @param[in] bus Initialised bus instance. 174 | */ 175 | static int _read_bit(const OneWireBus * bus) 176 | { 177 | int result = 0; 178 | owb_gpio_driver_info *i = info_from_bus(bus); 179 | 180 | portMUX_TYPE timeCriticalMutex = portMUX_INITIALIZER_UNLOCKED; 181 | portENTER_CRITICAL(&timeCriticalMutex); 182 | 183 | gpio_set_direction(i->gpio, GPIO_MODE_OUTPUT); 184 | gpio_set_level(i->gpio, 0); // Drive DQ low 185 | _us_delay(bus->timing->A); 186 | gpio_set_direction(i->gpio, GPIO_MODE_INPUT); // Release the bus 187 | gpio_set_level(i->gpio, 1); // Reset the output level for the next output 188 | _us_delay(bus->timing->E); 189 | 190 | #ifdef PHY_DEBUG 191 | gpio_set_level(PHY_DEBUG_GPIO, 1); 192 | #endif 193 | 194 | int level = gpio_get_level(i->gpio); 195 | 196 | #ifdef PHY_DEBUG 197 | gpio_set_level(PHY_DEBUG_GPIO, 0); 198 | #endif 199 | 200 | _us_delay(bus->timing->F); // Complete the timeslot and 10us recovery 201 | 202 | portEXIT_CRITICAL(&timeCriticalMutex); 203 | 204 | result = level & 0x01; 205 | 206 | return result; 207 | } 208 | 209 | /** 210 | * @brief Write 1-Wire data byte. 211 | * NOTE: The data is shifted out of the low bits, eg. it is written in the order of lsb to msb 212 | * @param[in] bus Initialised bus instance. 213 | * @param[in] data Value to write. 214 | * @param[in] number_of_bits_to_read bits to write 215 | */ 216 | static owb_status _write_bits(const OneWireBus * bus, uint8_t data, int number_of_bits_to_write) 217 | { 218 | ESP_LOGD(TAG, "write 0x%02x", data); 219 | for (int i = 0; i < number_of_bits_to_write; ++i) 220 | { 221 | _write_bit(bus, data & 0x01); 222 | data >>= 1; 223 | } 224 | 225 | return OWB_STATUS_OK; 226 | } 227 | 228 | /** 229 | * @brief Read 1-Wire data byte from bus. 230 | * NOTE: Data is read into the high bits, eg. each bit read is shifted down before the next bit is read 231 | * @param[in] bus Initialised bus instance. 232 | * @return Byte value read from bus. 233 | */ 234 | static owb_status _read_bits(const OneWireBus * bus, uint8_t *out, int number_of_bits_to_read) 235 | { 236 | uint8_t result = 0; 237 | for (int i = 0; i < number_of_bits_to_read; ++i) 238 | { 239 | result >>= 1; 240 | if (_read_bit(bus)) 241 | { 242 | result |= 0x80; 243 | } 244 | } 245 | ESP_LOGD(TAG, "read 0x%02x", result); 246 | *out = result; 247 | 248 | return OWB_STATUS_OK; 249 | } 250 | 251 | static owb_status _uninitialize(const OneWireBus * bus) 252 | { 253 | // Nothing to do here for this driver_info 254 | return OWB_STATUS_OK; 255 | } 256 | 257 | static const struct owb_driver gpio_function_table = 258 | { 259 | .name = "owb_gpio", 260 | .uninitialize = _uninitialize, 261 | .reset = _reset, 262 | .write_bits = _write_bits, 263 | .read_bits = _read_bits 264 | }; 265 | 266 | OneWireBus* owb_gpio_initialize(owb_gpio_driver_info * driver_info, int gpio) 267 | { 268 | ESP_LOGD(TAG, "%s(): gpio %d\n", __func__, gpio); 269 | 270 | driver_info->gpio = gpio; 271 | driver_info->bus.driver = &gpio_function_table; 272 | driver_info->bus.timing = &_StandardTiming; 273 | driver_info->bus.strong_pullup_gpio = GPIO_NUM_NC; 274 | 275 | // platform specific: 276 | gpio_pad_select_gpio(driver_info->gpio); 277 | 278 | #ifdef PHY_DEBUG 279 | gpio_config_t io_conf; 280 | io_conf.intr_type = GPIO_INTR_DISABLE; 281 | io_conf.mode = GPIO_MODE_OUTPUT; 282 | io_conf.pin_bit_mask = PHY_DEBUG_GPIO_MASK; 283 | io_conf.pull_down_en = GPIO_PULLDOWN_ENABLE; 284 | io_conf.pull_up_en = GPIO_PULLUP_DISABLE; 285 | ESP_ERROR_CHECK(gpio_config(&io_conf)); 286 | #endif 287 | 288 | return &(driver_info->bus); 289 | } 290 | -------------------------------------------------------------------------------- /include/owb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2017 David Antliff 5 | * Copyright (c) 2017 Chris Morgan 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | */ 25 | 26 | /** 27 | * @file 28 | * @brief Interface definitions for the 1-Wire bus component. 29 | * 30 | * This component provides structures and functions that are useful for communicating 31 | * with devices connected to a Maxim Integrated 1-Wire® bus via a single GPIO. 32 | * 33 | * Externally powered and "parasite-powered" devices are supported. 34 | * Please consult your device's datasheet for power requirements. 35 | */ 36 | 37 | #ifndef ONE_WIRE_BUS_H 38 | #define ONE_WIRE_BUS_H 39 | 40 | #include 41 | #include 42 | #include 43 | #include "driver/gpio.h" 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | 50 | // ROM commands 51 | #define OWB_ROM_SEARCH 0xF0 ///< Perform Search ROM cycle to identify devices on the bus 52 | #define OWB_ROM_READ 0x33 ///< Read device ROM (single device on bus only) 53 | #define OWB_ROM_MATCH 0x55 ///< Address a specific device on the bus by ROM 54 | #define OWB_ROM_SKIP 0xCC ///< Address all devices on the bus simultaneously 55 | #define OWB_ROM_SEARCH_ALARM 0xEC ///< Address all devices on the bus with a set alarm flag 56 | 57 | #define OWB_ROM_CODE_STRING_LENGTH (17) ///< Typical length of OneWire bus ROM ID as ASCII hex string, including null terminator 58 | 59 | #ifndef GPIO_NUM_NC 60 | # define GPIO_NUM_NC (-1) ///< ESP-IDF prior to v4.x does not define GPIO_NUM_NC 61 | #endif 62 | 63 | struct owb_driver; 64 | 65 | /** 66 | * @brief Structure containing 1-Wire bus information relevant to a single instance. 67 | */ 68 | typedef struct 69 | { 70 | const struct _OneWireBus_Timing * timing; ///< Pointer to timing information 71 | bool use_crc; ///< True if CRC checks are to be used when retrieving information from a device on the bus 72 | bool use_parasitic_power; ///< True if parasitic-powered devices are expected on the bus 73 | gpio_num_t strong_pullup_gpio; ///< Set if an external strong pull-up circuit is required 74 | const struct owb_driver * driver; ///< Pointer to hardware driver instance 75 | } OneWireBus; 76 | 77 | /** 78 | * @brief Represents a 1-Wire ROM Code. This is a sequence of eight bytes, where 79 | * the first byte is the family number, then the following 6 bytes form the 80 | * serial number. The final byte is the CRC8 check byte. 81 | */ 82 | typedef union 83 | { 84 | /// Provides access via field names 85 | struct fields 86 | { 87 | uint8_t family[1]; ///< family identifier (1 byte, LSB - read/write first) 88 | uint8_t serial_number[6]; ///< serial number (6 bytes) 89 | uint8_t crc[1]; ///< CRC check byte (1 byte, MSB - read/write last) 90 | } fields; ///< Provides access via field names 91 | 92 | uint8_t bytes[8]; ///< Provides raw byte access 93 | 94 | } OneWireBus_ROMCode; 95 | 96 | /** 97 | * @brief Represents the state of a device search on the 1-Wire bus. 98 | * 99 | * Pass a pointer to this structure to owb_search_first() and 100 | * owb_search_next() to iterate through detected devices on the bus. 101 | */ 102 | typedef struct 103 | { 104 | OneWireBus_ROMCode rom_code; ///< Device ROM code 105 | int last_discrepancy; ///< Bit index that identifies from which bit the next search discrepancy check should start 106 | int last_family_discrepancy; ///< Bit index that identifies the last discrepancy within the first 8-bit family code of the ROM code 107 | int last_device_flag; ///< Flag to indicate previous search was the last device detected 108 | } OneWireBus_SearchState; 109 | 110 | /** 111 | * @brief Represents the result of OWB API functions. 112 | */ 113 | typedef enum 114 | { 115 | OWB_STATUS_NOT_SET = -1, ///< A status value has not been set 116 | OWB_STATUS_OK = 0, ///< Operation succeeded 117 | OWB_STATUS_NOT_INITIALIZED, ///< Function was passed an uninitialised variable 118 | OWB_STATUS_PARAMETER_NULL, ///< Function was passed a null pointer 119 | OWB_STATUS_DEVICE_NOT_RESPONDING, ///< No response received from the addressed device or devices 120 | OWB_STATUS_CRC_FAILED, ///< CRC failed on data received from a device or devices 121 | OWB_STATUS_TOO_MANY_BITS, ///< Attempt to write an incorrect number of bits to the One Wire Bus 122 | OWB_STATUS_HW_ERROR ///< A hardware error occurred 123 | } owb_status; 124 | 125 | /** NOTE: Driver assumes that (*init) was called prior to any other methods */ 126 | struct owb_driver 127 | { 128 | /** Driver identification **/ 129 | const char* name; 130 | 131 | /** Pointer to driver uninitialization function **/ 132 | owb_status (*uninitialize)(const OneWireBus * bus); 133 | 134 | /** Pointer to driver reset functio **/ 135 | owb_status (*reset)(const OneWireBus * bus, bool *is_present); 136 | 137 | /** NOTE: The data is shifted out of the low bits, eg. it is written in the order of lsb to msb */ 138 | owb_status (*write_bits)(const OneWireBus *bus, uint8_t out, int number_of_bits_to_write); 139 | 140 | /** NOTE: Data is read into the high bits, eg. each bit read is shifted down before the next bit is read */ 141 | owb_status (*read_bits)(const OneWireBus *bus, uint8_t *in, int number_of_bits_to_read); 142 | }; 143 | 144 | /// @cond ignore 145 | #define container_of(ptr, type, member) ({ \ 146 | const typeof( ((type *)0)->member ) *__mptr = (ptr); \ 147 | (type *)( (char *)__mptr - offsetof(type,member) );}) 148 | /// @endcond 149 | 150 | /** 151 | * @brief call to release resources after completing use of the OneWireBus 152 | * @param[in] bus Pointer to initialised bus instance. 153 | * @return status 154 | */ 155 | owb_status owb_uninitialize(OneWireBus * bus); 156 | 157 | /** 158 | * @brief Enable or disable use of CRC checks on device communications. 159 | * @param[in] bus Pointer to initialised bus instance. 160 | * @param[in] use_crc True to enable CRC checks, false to disable. 161 | * @return status 162 | */ 163 | owb_status owb_use_crc(OneWireBus * bus, bool use_crc); 164 | 165 | /** 166 | * @brief Enable or disable use of parasitic power on the One Wire Bus. 167 | * This affects how devices signal on the bus, as devices cannot 168 | * signal by pulling the bus low when it is pulled high. 169 | * @param[in] bus Pointer to initialised bus instance. 170 | * @param[in] use_parasitic_power True to enable parasitic power, false to disable. 171 | * @return status 172 | */ 173 | owb_status owb_use_parasitic_power(OneWireBus * bus, bool use_parasitic_power); 174 | 175 | /** 176 | * @brief Enable or disable use of extra GPIO to activate strong pull-up circuit. 177 | * This only has effect if parasitic power mode is enabled. 178 | * signal by pulling the bus low when it is pulled high. 179 | * @param[in] bus Pointer to initialised bus instance. 180 | * @param[in] gpio Set to GPIO number to use, or GPIO_NUM_NC to disable. 181 | * @return status 182 | */ 183 | owb_status owb_use_strong_pullup_gpio(OneWireBus * bus, gpio_num_t gpio); 184 | 185 | /** 186 | * @brief Read ROM code from device - only works when there is a single device on the bus. 187 | * @param[in] bus Pointer to initialised bus instance. 188 | * @param[out] rom_code the value read from the device's rom 189 | * @return status 190 | */ 191 | owb_status owb_read_rom(const OneWireBus * bus, OneWireBus_ROMCode * rom_code); 192 | 193 | /** 194 | * @brief Verify the device specified by ROM code is present. 195 | * @param[in] bus Pointer to initialised bus instance. 196 | * @param[in] rom_code ROM code to verify. 197 | * @param[out] is_present Set to true if a device is present, false if not 198 | * @return status 199 | */ 200 | owb_status owb_verify_rom(const OneWireBus * bus, OneWireBus_ROMCode rom_code, bool * is_present); 201 | 202 | /** 203 | * @brief Reset the 1-Wire bus. 204 | * @param[in] bus Pointer to initialised bus instance. 205 | * @param[out] is_present set to true if at least one device is present on the bus 206 | * @return status 207 | */ 208 | owb_status owb_reset(const OneWireBus * bus, bool * is_present); 209 | 210 | /** 211 | * @brief Read a single bit from the 1-Wire bus. 212 | * @param[in] bus Pointer to initialised bus instance. 213 | * @param[out] out The bit value read from the bus. 214 | * @return status 215 | */ 216 | owb_status owb_read_bit(const OneWireBus * bus, uint8_t * out); 217 | 218 | /** 219 | * @brief Read a single byte from the 1-Wire bus. 220 | * @param[in] bus Pointer to initialised bus instance. 221 | * @param[out] out The byte value read from the bus (lsb only). 222 | * @return status 223 | */ 224 | owb_status owb_read_byte(const OneWireBus * bus, uint8_t * out); 225 | 226 | /** 227 | * @brief Read a number of bytes from the 1-Wire bus. 228 | * @param[in] bus Pointer to initialised bus instance. 229 | * @param[in, out] buffer Pointer to buffer to receive read data. 230 | * @param[in] len Number of bytes to read, must not exceed length of receive buffer. 231 | * @return status. 232 | */ 233 | owb_status owb_read_bytes(const OneWireBus * bus, uint8_t * buffer, unsigned int len); 234 | 235 | /** 236 | * @brief Write a bit to the 1-Wire bus. 237 | * @param[in] bus Pointer to initialised bus instance. 238 | * @param[in] bit Value to write (lsb only). 239 | * @return status 240 | */ 241 | owb_status owb_write_bit(const OneWireBus * bus, uint8_t bit); 242 | 243 | /** 244 | * @brief Write a single byte to the 1-Wire bus. 245 | * @param[in] bus Pointer to initialised bus instance. 246 | * @param[in] data Byte value to write to bus. 247 | * @return status 248 | */ 249 | owb_status owb_write_byte(const OneWireBus * bus, uint8_t data); 250 | 251 | /** 252 | * @brief Write a number of bytes to the 1-Wire bus. 253 | * @param[in] bus Pointer to initialised bus instance. 254 | * @param[in] buffer Pointer to buffer to write data from. 255 | * @param[in] len Number of bytes to write. 256 | * @return status 257 | */ 258 | owb_status owb_write_bytes(const OneWireBus * bus, const uint8_t * buffer, size_t len); 259 | 260 | /** 261 | * @brief Write a ROM code to the 1-Wire bus ensuring LSB is sent first. 262 | * @param[in] bus Pointer to initialised bus instance. 263 | * @param[in] rom_code ROM code to write to bus. 264 | * @return status 265 | */ 266 | owb_status owb_write_rom_code(const OneWireBus * bus, OneWireBus_ROMCode rom_code); 267 | 268 | /** 269 | * @brief 1-Wire 8-bit CRC lookup. 270 | * @param[in] crc Starting CRC value. Pass in prior CRC to accumulate. 271 | * @param[in] data Byte to feed into CRC. 272 | * @return Resultant CRC value. 273 | * Should be zero if last byte was the CRC byte and the CRC matches. 274 | */ 275 | uint8_t owb_crc8_byte(uint8_t crc, uint8_t data); 276 | 277 | /** 278 | * @brief 1-Wire 8-bit CRC lookup with accumulation over a block of bytes. 279 | * @param[in] crc Starting CRC value. Pass in prior CRC to accumulate. 280 | * @param[in] data Array of bytes to feed into CRC. 281 | * @param[in] len Length of data array in bytes. 282 | * @return Resultant CRC value. 283 | * Should be zero if last byte was the CRC byte and the CRC matches. 284 | */ 285 | uint8_t owb_crc8_bytes(uint8_t crc, const uint8_t * data, size_t len); 286 | 287 | /** 288 | * @brief Locates the first device on the 1-Wire bus, if present. 289 | * @param[in] bus Pointer to initialised bus instance. 290 | * @param[in,out] state Pointer to an existing search state structure. 291 | * @param[out] found_device True if a device is found, false if no devices are found. 292 | * If a device is found, the ROM Code can be obtained from the state. 293 | * @return status 294 | */ 295 | owb_status owb_search_first(const OneWireBus * bus, OneWireBus_SearchState * state, bool *found_device); 296 | 297 | /** 298 | * @brief Locates the next device on the 1-Wire bus, if present, starting from 299 | * the provided state. Further calls will yield additional devices, if present. 300 | * @param[in] bus Pointer to initialised bus instance. 301 | * @param[in,out] state Pointer to an existing search state structure. 302 | * @param[out] found_device True if a device is found, false if no devices are found. 303 | * If a device is found, the ROM Code can be obtained from the state. 304 | * @return status 305 | */ 306 | owb_status owb_search_next(const OneWireBus * bus, OneWireBus_SearchState * state, bool *found_device); 307 | 308 | /** 309 | * @brief Create a string representation of a ROM code, most significant byte (CRC8) first. 310 | * @param[in] rom_code The ROM code to convert to string representation. 311 | * @param[out] buffer The destination for the string representation. It will be null terminated. 312 | * @param[in] len The length of the buffer in bytes. 64-bit ROM codes require 16 characters 313 | * to represent as a string, plus a null terminator, for 17 bytes. 314 | * See OWB_ROM_CODE_STRING_LENGTH. 315 | * @return pointer to the byte beyond the last byte written 316 | */ 317 | char * owb_string_from_rom_code(OneWireBus_ROMCode rom_code, char * buffer, size_t len); 318 | 319 | /** 320 | * @brief Enable or disable the strong-pullup GPIO, if configured. 321 | * @param[in] bus Pointer to initialised bus instance. 322 | * @param[in] enable If true, enable the external strong pull-up by setting the GPIO high. 323 | * If false, disable the external strong pull-up by setting the GPIO low. 324 | * @return status 325 | */ 326 | owb_status owb_set_strong_pullup(const OneWireBus * bus, bool enable); 327 | 328 | 329 | #include "owb_gpio.h" 330 | #include "owb_rmt.h" 331 | 332 | #ifdef __cplusplus 333 | } 334 | #endif 335 | 336 | #endif // ONE_WIRE_BUS_H 337 | -------------------------------------------------------------------------------- /owb_rmt.c: -------------------------------------------------------------------------------- 1 | /* 2 | Created by Chris Morgan based on the nodemcu project driver. 3 | Copyright 2017 Chris Morgan 4 | 5 | Ported to ESP32 RMT peripheral for low-level signal generation by Arnim Laeuger. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | "Software"), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 22 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 24 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | 26 | Much of the code was inspired by Derek Yerger's code, though I don't 27 | think much of that remains. In any event that was.. 28 | (copyleft) 2006 by Derek Yerger - Free to distribute freely. 29 | 30 | The CRC code was excerpted and inspired by the Dallas Semiconductor 31 | sample code bearing this copyright. 32 | //--------------------------------------------------------------------------- 33 | // Copyright (C) 2000 Dallas Semiconductor Corporation, All Rights Reserved. 34 | // 35 | // Permission is hereby granted, free of charge, to any person obtaining a 36 | // copy of this software and associated documentation files (the "Software"), 37 | // to deal in the Software without restriction, including without limitation 38 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 39 | // and/or sell copies of the Software, and to permit persons to whom the 40 | // Software is furnished to do so, subject to the following conditions: 41 | // 42 | // The above copyright notice and this permission notice shall be included 43 | // in all copies or substantial portions of the Software. 44 | // 45 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 46 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 47 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 48 | // IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES 49 | // OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 50 | // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 51 | // OTHER DEALINGS IN THE SOFTWARE. 52 | // 53 | // Except as contained in this notice, the name of Dallas Semiconductor 54 | // shall not be used except as stated in the Dallas Semiconductor 55 | // Branding Policy. 56 | //-------------------------------------------------------------------------- 57 | */ 58 | 59 | #include "owb.h" 60 | 61 | #include "driver/rmt.h" 62 | #include "driver/gpio.h" 63 | #include "esp_log.h" 64 | #include "soc/gpio_periph.h" // for GPIO_PIN_MUX_REG 65 | 66 | #undef OW_DEBUG 67 | 68 | 69 | // bus reset: duration of low phase [us] 70 | #define OW_DURATION_RESET 480 71 | 72 | // overall slot duration 73 | #define OW_DURATION_SLOT 75 74 | 75 | // write 1 slot and read slot durations [us] 76 | #define OW_DURATION_1_LOW 6 77 | #define OW_DURATION_1_HIGH (OW_DURATION_SLOT - OW_DURATION_1_LOW) 78 | 79 | // write 0 slot durations [us] 80 | #define OW_DURATION_0_LOW 65 81 | #define OW_DURATION_0_HIGH (OW_DURATION_SLOT - OW_DURATION_0_LOW) 82 | 83 | // sample time for read slot 84 | #define OW_DURATION_SAMPLE (15-2) 85 | 86 | // RX idle threshold 87 | // needs to be larger than any duration occurring during write slots 88 | #define OW_DURATION_RX_IDLE (OW_DURATION_SLOT + 2) 89 | 90 | // maximum number of bits that can be read or written per slot 91 | #define MAX_BITS_PER_SLOT (8) 92 | 93 | static const char * TAG = "owb_rmt"; 94 | 95 | #define info_of_driver(owb) container_of(owb, owb_rmt_driver_info, bus) 96 | 97 | // flush any pending/spurious traces from the RX channel 98 | static void onewire_flush_rmt_rx_buf(const OneWireBus * bus) 99 | { 100 | void * p = NULL; 101 | size_t s = 0; 102 | 103 | owb_rmt_driver_info * i = info_of_driver(bus); 104 | 105 | while ((p = xRingbufferReceive(i->rb, &s, 0))) 106 | { 107 | ESP_LOGD(TAG, "flushing entry"); 108 | vRingbufferReturnItem(i->rb, p); 109 | } 110 | } 111 | 112 | static owb_status _reset(const OneWireBus * bus, bool * is_present) 113 | { 114 | rmt_item32_t tx_items[1] = {0}; 115 | bool _is_present = false; 116 | int res = OWB_STATUS_OK; 117 | 118 | owb_rmt_driver_info * i = info_of_driver(bus); 119 | 120 | tx_items[0].duration0 = OW_DURATION_RESET; 121 | tx_items[0].level0 = 0; 122 | tx_items[0].duration1 = 0; 123 | tx_items[0].level1 = 1; 124 | 125 | uint16_t old_rx_thresh = 0; 126 | rmt_get_rx_idle_thresh(i->rx_channel, &old_rx_thresh); 127 | rmt_set_rx_idle_thresh(i->rx_channel, OW_DURATION_RESET + 60); 128 | 129 | onewire_flush_rmt_rx_buf(bus); 130 | rmt_rx_start(i->rx_channel, true); 131 | if (rmt_write_items(i->tx_channel, tx_items, 1, true) == ESP_OK) 132 | { 133 | size_t rx_size = 0; 134 | rmt_item32_t * rx_items = (rmt_item32_t *)xRingbufferReceive(i->rb, &rx_size, 100 / portTICK_PERIOD_MS); 135 | 136 | if (rx_items) 137 | { 138 | if (rx_size >= (1 * sizeof(rmt_item32_t))) 139 | { 140 | #ifdef OW_DEBUG 141 | ESP_LOGI(TAG, "rx_size: %d", rx_size); 142 | 143 | for (int i = 0; i < (rx_size / sizeof(rmt_item32_t)); i++) 144 | { 145 | ESP_LOGI(TAG, "i: %d, level0: %d, duration %d", i, rx_items[i].level0, rx_items[i].duration0); 146 | ESP_LOGI(TAG, "i: %d, level1: %d, duration %d", i, rx_items[i].level1, rx_items[i].duration1); 147 | } 148 | #endif 149 | 150 | // parse signal and search for presence pulse 151 | if ((rx_items[0].level0 == 0) && (rx_items[0].duration0 >= OW_DURATION_RESET - 2)) 152 | { 153 | if ((rx_items[0].level1 == 1) && (rx_items[0].duration1 > 0)) 154 | { 155 | if (rx_items[1].level0 == 0) 156 | { 157 | _is_present = true; 158 | } 159 | } 160 | } 161 | } 162 | 163 | vRingbufferReturnItem(i->rb, (void *)rx_items); 164 | } 165 | else 166 | { 167 | // time out occurred, this indicates an unconnected / misconfigured bus 168 | ESP_LOGE(TAG, "rx_items == 0"); 169 | res = OWB_STATUS_HW_ERROR; 170 | } 171 | } 172 | else 173 | { 174 | // error in tx channel 175 | ESP_LOGE(TAG, "Error tx"); 176 | res = OWB_STATUS_HW_ERROR; 177 | } 178 | 179 | rmt_rx_stop(i->rx_channel); 180 | rmt_set_rx_idle_thresh(i->rx_channel, old_rx_thresh); 181 | 182 | *is_present = _is_present; 183 | 184 | ESP_LOGD(TAG, "_is_present %d", _is_present); 185 | 186 | return res; 187 | } 188 | 189 | static rmt_item32_t _encode_write_slot(uint8_t val) 190 | { 191 | rmt_item32_t item = {0}; 192 | 193 | item.level0 = 0; 194 | item.level1 = 1; 195 | if (val) 196 | { 197 | // write "1" slot 198 | item.duration0 = OW_DURATION_1_LOW; 199 | item.duration1 = OW_DURATION_1_HIGH; 200 | } 201 | else 202 | { 203 | // write "0" slot 204 | item.duration0 = OW_DURATION_0_LOW; 205 | item.duration1 = OW_DURATION_0_HIGH; 206 | } 207 | 208 | return item; 209 | } 210 | 211 | /** NOTE: The data is shifted out of the low bits, eg. it is written in the order of lsb to msb */ 212 | static owb_status _write_bits(const OneWireBus * bus, uint8_t out, int number_of_bits_to_write) 213 | { 214 | rmt_item32_t tx_items[MAX_BITS_PER_SLOT + 1] = {0}; 215 | owb_rmt_driver_info * info = info_of_driver(bus); 216 | 217 | if (number_of_bits_to_write > MAX_BITS_PER_SLOT) 218 | { 219 | return OWB_STATUS_TOO_MANY_BITS; 220 | } 221 | 222 | // write requested bits as pattern to TX buffer 223 | for (int i = 0; i < number_of_bits_to_write; i++) 224 | { 225 | tx_items[i] = _encode_write_slot(out & 0x01); 226 | out >>= 1; 227 | } 228 | 229 | // end marker 230 | tx_items[number_of_bits_to_write].level0 = 1; 231 | tx_items[number_of_bits_to_write].duration0 = 0; 232 | 233 | owb_status status = OWB_STATUS_NOT_SET; 234 | 235 | if (rmt_write_items(info->tx_channel, tx_items, number_of_bits_to_write+1, true) == ESP_OK) 236 | { 237 | status = OWB_STATUS_OK; 238 | } 239 | else 240 | { 241 | status = OWB_STATUS_HW_ERROR; 242 | ESP_LOGE(TAG, "rmt_write_items() failed"); 243 | } 244 | 245 | return status; 246 | } 247 | 248 | static rmt_item32_t _encode_read_slot(void) 249 | { 250 | rmt_item32_t item = {0}; 251 | 252 | // construct pattern for a single read time slot 253 | item.level0 = 0; 254 | item.duration0 = OW_DURATION_1_LOW; // shortly force 0 255 | item.level1 = 1; 256 | item.duration1 = OW_DURATION_1_HIGH; // release high and finish slot 257 | return item; 258 | } 259 | 260 | /** NOTE: Data is read into the high bits, eg. each bit read is shifted down before the next bit is read */ 261 | static owb_status _read_bits(const OneWireBus * bus, uint8_t *in, int number_of_bits_to_read) 262 | { 263 | rmt_item32_t tx_items[MAX_BITS_PER_SLOT + 1] = {0}; 264 | uint8_t read_data = 0; 265 | int res = OWB_STATUS_OK; 266 | 267 | owb_rmt_driver_info *info = info_of_driver(bus); 268 | 269 | if (number_of_bits_to_read > MAX_BITS_PER_SLOT) 270 | { 271 | ESP_LOGE(TAG, "_read_bits() OWB_STATUS_TOO_MANY_BITS"); 272 | return OWB_STATUS_TOO_MANY_BITS; 273 | } 274 | 275 | // generate requested read slots 276 | for (int i = 0; i < number_of_bits_to_read; i++) 277 | { 278 | tx_items[i] = _encode_read_slot(); 279 | } 280 | 281 | // end marker 282 | tx_items[number_of_bits_to_read].level0 = 1; 283 | tx_items[number_of_bits_to_read].duration0 = 0; 284 | 285 | onewire_flush_rmt_rx_buf(bus); 286 | rmt_rx_start(info->rx_channel, true); 287 | if (rmt_write_items(info->tx_channel, tx_items, number_of_bits_to_read+1, true) == ESP_OK) 288 | { 289 | size_t rx_size = 0; 290 | rmt_item32_t *rx_items = (rmt_item32_t *)xRingbufferReceive(info->rb, &rx_size, 100 / portTICK_PERIOD_MS); 291 | 292 | if (rx_items) 293 | { 294 | #ifdef OW_DEBUG 295 | for (int i = 0; i < rx_size / 4; i++) 296 | { 297 | ESP_LOGI(TAG, "level: %d, duration %d", rx_items[i].level0, rx_items[i].duration0); 298 | ESP_LOGI(TAG, "level: %d, duration %d", rx_items[i].level1, rx_items[i].duration1); 299 | } 300 | #endif 301 | 302 | if (rx_size >= number_of_bits_to_read * sizeof(rmt_item32_t)) 303 | { 304 | for (int i = 0; i < number_of_bits_to_read; i++) 305 | { 306 | read_data >>= 1; 307 | // parse signal and identify logical bit 308 | if (rx_items[i].level1 == 1) 309 | { 310 | if ((rx_items[i].level0 == 0) && (rx_items[i].duration0 < OW_DURATION_SAMPLE)) 311 | { 312 | // rising edge occured before 15us -> bit 1 313 | read_data |= 0x80; 314 | } 315 | } 316 | } 317 | read_data >>= 8 - number_of_bits_to_read; 318 | } 319 | 320 | vRingbufferReturnItem(info->rb, (void *)rx_items); 321 | } 322 | else 323 | { 324 | // time out occurred, this indicates an unconnected / misconfigured bus 325 | ESP_LOGE(TAG, "rx_items == 0"); 326 | res = OWB_STATUS_HW_ERROR; 327 | } 328 | } 329 | else 330 | { 331 | // error in tx channel 332 | ESP_LOGE(TAG, "Error tx"); 333 | res = OWB_STATUS_HW_ERROR; 334 | } 335 | 336 | rmt_rx_stop(info->rx_channel); 337 | 338 | *in = read_data; 339 | return res; 340 | } 341 | 342 | static owb_status _uninitialize(const OneWireBus *bus) 343 | { 344 | owb_rmt_driver_info * info = info_of_driver(bus); 345 | 346 | rmt_driver_uninstall(info->tx_channel); 347 | rmt_driver_uninstall(info->rx_channel); 348 | 349 | return OWB_STATUS_OK; 350 | } 351 | 352 | static struct owb_driver rmt_function_table = 353 | { 354 | .name = "owb_rmt", 355 | .uninitialize = _uninitialize, 356 | .reset = _reset, 357 | .write_bits = _write_bits, 358 | .read_bits = _read_bits 359 | }; 360 | 361 | static owb_status _init(owb_rmt_driver_info *info, gpio_num_t gpio_num, 362 | rmt_channel_t tx_channel, rmt_channel_t rx_channel) 363 | { 364 | owb_status status = OWB_STATUS_HW_ERROR; 365 | 366 | // Ensure the RMT peripheral is not already running 367 | // Note: if using RMT elsewhere, don't call this here, call it at the start of your program instead. 368 | //periph_module_disable(PERIPH_RMT_MODULE); 369 | //periph_module_enable(PERIPH_RMT_MODULE); 370 | 371 | info->bus.driver = &rmt_function_table; 372 | info->tx_channel = tx_channel; 373 | info->rx_channel = rx_channel; 374 | info->gpio = gpio_num; 375 | 376 | #ifdef OW_DEBUG 377 | ESP_LOGI(TAG, "RMT TX channel: %d", info->tx_channel); 378 | ESP_LOGI(TAG, "RMT RX channel: %d", info->rx_channel); 379 | #endif 380 | 381 | rmt_config_t rmt_tx = {0}; 382 | rmt_tx.channel = info->tx_channel; 383 | rmt_tx.gpio_num = gpio_num; 384 | rmt_tx.mem_block_num = 1; 385 | rmt_tx.clk_div = 80; 386 | rmt_tx.tx_config.loop_en = false; 387 | rmt_tx.tx_config.carrier_en = false; 388 | rmt_tx.tx_config.idle_level = 1; 389 | rmt_tx.tx_config.idle_output_en = true; 390 | rmt_tx.rmt_mode = RMT_MODE_TX; 391 | if (rmt_config(&rmt_tx) == ESP_OK) 392 | { 393 | if (rmt_driver_install(rmt_tx.channel, 0, ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_SHARED) == ESP_OK) 394 | { 395 | rmt_set_source_clk(rmt_tx.channel, RMT_BASECLK_APB); // only APB is supported by IDF 4.2 396 | rmt_config_t rmt_rx = {0}; 397 | rmt_rx.channel = info->rx_channel; 398 | rmt_rx.gpio_num = gpio_num; 399 | rmt_rx.clk_div = 80; 400 | rmt_rx.mem_block_num = 1; 401 | rmt_rx.rmt_mode = RMT_MODE_RX; 402 | rmt_rx.rx_config.filter_en = true; 403 | rmt_rx.rx_config.filter_ticks_thresh = 30; 404 | rmt_rx.rx_config.idle_threshold = OW_DURATION_RX_IDLE; 405 | if (rmt_config(&rmt_rx) == ESP_OK) 406 | { 407 | if (rmt_driver_install(rmt_rx.channel, 512, ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_SHARED) == ESP_OK) 408 | { 409 | rmt_set_source_clk(rmt_rx.channel, RMT_BASECLK_APB); // only APB is supported by IDF 4.2 410 | rmt_get_ringbuf_handle(info->rx_channel, &info->rb); 411 | status = OWB_STATUS_OK; 412 | } 413 | else 414 | { 415 | ESP_LOGE(TAG, "failed to install rx driver"); 416 | } 417 | } 418 | else 419 | { 420 | status = OWB_STATUS_HW_ERROR; 421 | ESP_LOGE(TAG, "failed to configure rx, uninstalling rmt driver on tx channel"); 422 | rmt_driver_uninstall(rmt_tx.channel); 423 | } 424 | } 425 | else 426 | { 427 | ESP_LOGE(TAG, "failed to install tx driver"); 428 | } 429 | } 430 | else 431 | { 432 | ESP_LOGE(TAG, "failed to configure tx"); 433 | } 434 | 435 | // attach GPIO to previous pin 436 | if (gpio_num < 32) 437 | { 438 | GPIO.enable_w1ts = (0x1 << gpio_num); 439 | } 440 | else 441 | { 442 | GPIO.enable1_w1ts.data = (0x1 << (gpio_num - 32)); 443 | } 444 | 445 | // attach RMT channels to new gpio pin 446 | // ATTENTION: set pin for rx first since gpio_output_disable() will 447 | // remove rmt output signal in matrix! 448 | rmt_set_gpio(info->rx_channel, RMT_MODE_RX, gpio_num, 0); 449 | rmt_set_gpio(info->tx_channel, RMT_MODE_TX, gpio_num, 0); 450 | 451 | // force pin direction to input to enable path to RX channel 452 | PIN_INPUT_ENABLE(GPIO_PIN_MUX_REG[gpio_num]); 453 | 454 | // enable open drain 455 | GPIO.pin[gpio_num].pad_driver = 1; 456 | 457 | return status; 458 | } 459 | 460 | OneWireBus * owb_rmt_initialize(owb_rmt_driver_info * info, gpio_num_t gpio_num, 461 | rmt_channel_t tx_channel, rmt_channel_t rx_channel) 462 | { 463 | ESP_LOGD(TAG, "%s: gpio_num: %d, tx_channel: %d, rx_channel: %d", 464 | __func__, gpio_num, tx_channel, rx_channel); 465 | 466 | owb_status status = _init(info, gpio_num, tx_channel, rx_channel); 467 | if (status != OWB_STATUS_OK) 468 | { 469 | ESP_LOGE(TAG, "_init() failed with status %d", status); 470 | } 471 | 472 | info->bus.strong_pullup_gpio = GPIO_NUM_NC; 473 | 474 | return &(info->bus); 475 | } 476 | -------------------------------------------------------------------------------- /owb.c: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2017 David Antliff 5 | * Copyright (c) 2017 Chris Morgan 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | */ 25 | 26 | /** 27 | * @file 28 | */ 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #include "freertos/FreeRTOS.h" 37 | #include "freertos/task.h" 38 | #include "esp_log.h" 39 | #include "sdkconfig.h" 40 | #include "driver/gpio.h" 41 | #include "rom/gpio.h" // for gpio_pad_select_gpio() 42 | 43 | #include "owb.h" 44 | #include "owb_gpio.h" 45 | 46 | static const char * TAG = "owb"; 47 | 48 | static bool _is_init(const OneWireBus * bus) 49 | { 50 | bool ok = false; 51 | if (bus != NULL) 52 | { 53 | if (bus->driver) 54 | { 55 | // OK 56 | ok = true; 57 | } 58 | else 59 | { 60 | ESP_LOGE(TAG, "bus is not initialised"); 61 | } 62 | } 63 | else 64 | { 65 | ESP_LOGE(TAG, "bus is NULL"); 66 | } 67 | return ok; 68 | } 69 | 70 | /** 71 | * @brief 1-Wire 8-bit CRC lookup. 72 | * @param[in] crc Starting CRC value. Pass in prior CRC to accumulate. 73 | * @param[in] data Byte to feed into CRC. 74 | * @return Resultant CRC value. 75 | */ 76 | static uint8_t _calc_crc(uint8_t crc, uint8_t data) 77 | { 78 | // https://www.maximintegrated.com/en/app-notes/index.mvp/id/27 79 | static const uint8_t table[256] = { 80 | 0, 94, 188, 226, 97, 63, 221, 131, 194, 156, 126, 32, 163, 253, 31, 65, 81 | 157, 195, 33, 127, 252, 162, 64, 30, 95, 1, 227, 189, 62, 96, 130, 220, 82 | 35, 125, 159, 193, 66, 28, 254, 160, 225, 191, 93, 3, 128, 222, 60, 98, 83 | 190, 224, 2, 92, 223, 129, 99, 61, 124, 34, 192, 158, 29, 67, 161, 255, 84 | 70, 24, 250, 164, 39, 121, 155, 197, 132, 218, 56, 102, 229, 187, 89, 7, 85 | 219, 133, 103, 57, 186, 228, 6, 88, 25, 71, 165, 251, 120, 38, 196, 154, 86 | 101, 59, 217, 135, 4, 90, 184, 230, 167, 249, 27, 69, 198, 152, 122, 36, 87 | 248, 166, 68, 26, 153, 199, 37, 123, 58, 100, 134, 216, 91, 5, 231, 185, 88 | 140, 210, 48, 110, 237, 179, 81, 15, 78, 16, 242, 172, 47, 113, 147, 205, 89 | 17, 79, 173, 243, 112, 46, 204, 146, 211, 141, 111, 49, 178, 236, 14, 80, 90 | 175, 241, 19, 77, 206, 144, 114, 44, 109, 51, 209, 143, 12, 82, 176, 238, 91 | 50, 108, 142, 208, 83, 13, 239, 177, 240, 174, 76, 18, 145, 207, 45, 115, 92 | 202, 148, 118, 40, 171, 245, 23, 73, 8, 86, 180, 234, 105, 55, 213, 139, 93 | 87, 9, 235, 181, 54, 104, 138, 212, 149, 203, 41, 119, 244, 170, 72, 22, 94 | 233, 183, 85, 11, 136, 214, 52, 106, 43, 117, 151, 201, 74, 20, 246, 168, 95 | 116, 42, 200, 150, 21, 75, 169, 247, 182, 232, 10, 84, 215, 137, 107, 53 96 | }; 97 | 98 | return table[crc ^ data]; 99 | } 100 | 101 | static uint8_t _calc_crc_block(uint8_t crc, const uint8_t * buffer, size_t len) 102 | { 103 | do 104 | { 105 | crc = _calc_crc(crc, *buffer++); 106 | ESP_LOGD(TAG, "buffer 0x%02x, crc 0x%02x, len %d", (uint8_t)*(buffer - 1), (int)crc, (int)len); 107 | } 108 | while (--len > 0); 109 | return crc; 110 | } 111 | 112 | /** 113 | * @param[out] is_found true if a device was found, false if not 114 | * @return status 115 | */ 116 | static owb_status _search(const OneWireBus * bus, OneWireBus_SearchState * state, bool * is_found) 117 | { 118 | // Based on https://www.maximintegrated.com/en/app-notes/index.mvp/id/187 119 | 120 | // initialize for search 121 | int id_bit_number = 1; 122 | int last_zero = 0; 123 | int rom_byte_number = 0; 124 | uint8_t id_bit = 0; 125 | uint8_t cmp_id_bit = 0; 126 | uint8_t rom_byte_mask = 1; 127 | uint8_t search_direction = 0; 128 | bool search_result = false; 129 | uint8_t crc8 = 0; 130 | owb_status status = OWB_STATUS_NOT_SET; 131 | 132 | // if the last call was not the last one 133 | if (!state->last_device_flag) 134 | { 135 | // 1-Wire reset 136 | bool is_present; 137 | bus->driver->reset(bus, &is_present); 138 | if (!is_present) 139 | { 140 | // reset the search 141 | state->last_discrepancy = 0; 142 | state->last_device_flag = false; 143 | state->last_family_discrepancy = 0; 144 | *is_found = false; 145 | return OWB_STATUS_OK; 146 | } 147 | 148 | // issue the search command 149 | bus->driver->write_bits(bus, OWB_ROM_SEARCH, 8); 150 | 151 | // loop to do the search 152 | do 153 | { 154 | id_bit = cmp_id_bit = 0; 155 | 156 | // read a bit and its complement 157 | bus->driver->read_bits(bus, &id_bit, 1); 158 | bus->driver->read_bits(bus, &cmp_id_bit, 1); 159 | 160 | // check for no devices on 1-wire (signal level is high in both bit reads) 161 | if (id_bit && cmp_id_bit) 162 | { 163 | break; 164 | } 165 | else 166 | { 167 | // all devices coupled have 0 or 1 168 | if (id_bit != cmp_id_bit) 169 | { 170 | search_direction = (id_bit) ? 1 : 0; // bit write value for search 171 | } 172 | else 173 | { 174 | // if this discrepancy if before the Last Discrepancy 175 | // on a previous next then pick the same as last time 176 | if (id_bit_number < state->last_discrepancy) 177 | { 178 | search_direction = ((state->rom_code.bytes[rom_byte_number] & rom_byte_mask) > 0); 179 | } 180 | else 181 | { 182 | // if equal to last pick 1, if not then pick 0 183 | search_direction = (id_bit_number == state->last_discrepancy); 184 | } 185 | 186 | // if 0 was picked then record its position in LastZero 187 | if (search_direction == 0) 188 | { 189 | last_zero = id_bit_number; 190 | 191 | // check for Last discrepancy in family 192 | if (last_zero < 9) 193 | { 194 | state->last_family_discrepancy = last_zero; 195 | } 196 | } 197 | } 198 | 199 | // set or clear the bit in the ROM byte rom_byte_number 200 | // with mask rom_byte_mask 201 | if (search_direction == 1) 202 | { 203 | state->rom_code.bytes[rom_byte_number] |= rom_byte_mask; 204 | } 205 | else 206 | { 207 | state->rom_code.bytes[rom_byte_number] &= ~rom_byte_mask; 208 | } 209 | 210 | // serial number search direction write bit 211 | bus->driver->write_bits(bus, search_direction, 1); 212 | 213 | // increment the byte counter id_bit_number 214 | // and shift the mask rom_byte_mask 215 | id_bit_number++; 216 | rom_byte_mask <<= 1; 217 | 218 | // if the mask is 0 then go to new SerialNum byte rom_byte_number and reset mask 219 | if (rom_byte_mask == 0) 220 | { 221 | crc8 = owb_crc8_byte(crc8, state->rom_code.bytes[rom_byte_number]); // accumulate the CRC 222 | rom_byte_number++; 223 | rom_byte_mask = 1; 224 | } 225 | } 226 | } 227 | while (rom_byte_number < 8); // loop until through all ROM bytes 0-7 228 | 229 | // if the search was successful then 230 | if (!((id_bit_number < 65) || (crc8 != 0))) 231 | { 232 | // search successful so set LastDiscrepancy,LastDeviceFlag,search_result 233 | state->last_discrepancy = last_zero; 234 | 235 | // check for last device 236 | if (state->last_discrepancy == 0) 237 | { 238 | state->last_device_flag = true; 239 | } 240 | 241 | search_result = true; 242 | } 243 | } 244 | 245 | // if no device found then reset counters so next 'search' will be like a first 246 | if (!search_result || !state->rom_code.bytes[0]) 247 | { 248 | state->last_discrepancy = 0; 249 | state->last_device_flag = false; 250 | state->last_family_discrepancy = 0; 251 | search_result = false; 252 | } 253 | 254 | status = OWB_STATUS_OK; 255 | 256 | *is_found = search_result; 257 | 258 | return status; 259 | } 260 | 261 | // Public API 262 | 263 | owb_status owb_uninitialize(OneWireBus * bus) 264 | { 265 | owb_status status = OWB_STATUS_NOT_SET; 266 | 267 | if (!_is_init(bus)) 268 | { 269 | status = OWB_STATUS_NOT_INITIALIZED; 270 | } 271 | else 272 | { 273 | bus->driver->uninitialize(bus); 274 | status = OWB_STATUS_OK; 275 | } 276 | 277 | return status; 278 | } 279 | 280 | owb_status owb_use_crc(OneWireBus * bus, bool use_crc) 281 | { 282 | owb_status status = OWB_STATUS_NOT_SET; 283 | 284 | if (!bus) 285 | { 286 | status = OWB_STATUS_PARAMETER_NULL; 287 | } 288 | else if (!_is_init(bus)) 289 | { 290 | status = OWB_STATUS_NOT_INITIALIZED; 291 | } 292 | else 293 | { 294 | bus->use_crc = use_crc; 295 | ESP_LOGD(TAG, "use_crc %d", bus->use_crc); 296 | 297 | status = OWB_STATUS_OK; 298 | } 299 | 300 | return status; 301 | } 302 | 303 | owb_status owb_use_parasitic_power(OneWireBus * bus, bool use_parasitic_power) 304 | { 305 | owb_status status = OWB_STATUS_NOT_SET; 306 | 307 | if (!bus) 308 | { 309 | status = OWB_STATUS_PARAMETER_NULL; 310 | } 311 | else if (!_is_init(bus)) 312 | { 313 | status = OWB_STATUS_NOT_INITIALIZED; 314 | } 315 | else 316 | { 317 | bus->use_parasitic_power = use_parasitic_power; 318 | ESP_LOGD(TAG, "use_parasitic_power %d", bus->use_parasitic_power); 319 | 320 | status = OWB_STATUS_OK; 321 | } 322 | 323 | return status; 324 | } 325 | 326 | owb_status owb_use_strong_pullup_gpio(OneWireBus * bus, gpio_num_t gpio) 327 | { 328 | owb_status status = OWB_STATUS_NOT_SET; 329 | 330 | if (!bus) 331 | { 332 | status = OWB_STATUS_PARAMETER_NULL; 333 | } 334 | else if (!_is_init(bus)) 335 | { 336 | status = OWB_STATUS_NOT_INITIALIZED; 337 | } 338 | else 339 | { 340 | if (gpio != GPIO_NUM_NC) { 341 | // The strong GPIO pull-up is only activated if parasitic-power mode is enabled 342 | if (!bus->use_parasitic_power) { 343 | ESP_LOGW(TAG, "Strong pull-up GPIO set with parasitic-power disabled"); 344 | } 345 | 346 | gpio_pad_select_gpio(gpio); 347 | gpio_set_direction(gpio, GPIO_MODE_OUTPUT); 348 | } 349 | else 350 | { 351 | gpio_reset_pin(bus->strong_pullup_gpio); 352 | } 353 | 354 | bus->strong_pullup_gpio = gpio; 355 | ESP_LOGD(TAG, "use_strong_pullup_gpio %d", bus->strong_pullup_gpio); 356 | 357 | status = OWB_STATUS_OK; 358 | } 359 | 360 | return status; 361 | } 362 | 363 | owb_status owb_read_rom(const OneWireBus * bus, OneWireBus_ROMCode *rom_code) 364 | { 365 | owb_status status = OWB_STATUS_NOT_SET; 366 | 367 | memset(rom_code, 0, sizeof(OneWireBus_ROMCode)); 368 | 369 | if (!bus || !rom_code) 370 | { 371 | status = OWB_STATUS_PARAMETER_NULL; 372 | } 373 | else if (!_is_init(bus)) 374 | { 375 | status = OWB_STATUS_NOT_INITIALIZED; 376 | } 377 | else 378 | { 379 | bool is_present; 380 | bus->driver->reset(bus, &is_present); 381 | if (is_present) 382 | { 383 | uint8_t value = OWB_ROM_READ; 384 | bus->driver->write_bits(bus, value, 8); 385 | owb_read_bytes(bus, rom_code->bytes, sizeof(OneWireBus_ROMCode)); 386 | 387 | if (bus->use_crc) 388 | { 389 | if (owb_crc8_bytes(0, rom_code->bytes, sizeof(OneWireBus_ROMCode)) != 0) 390 | { 391 | ESP_LOGE(TAG, "CRC failed"); 392 | memset(rom_code->bytes, 0, sizeof(OneWireBus_ROMCode)); 393 | status = OWB_STATUS_CRC_FAILED; 394 | } 395 | else 396 | { 397 | status = OWB_STATUS_OK; 398 | } 399 | } 400 | else 401 | { 402 | status = OWB_STATUS_OK; 403 | } 404 | char rom_code_s[OWB_ROM_CODE_STRING_LENGTH]; 405 | owb_string_from_rom_code(*rom_code, rom_code_s, sizeof(rom_code_s)); 406 | ESP_LOGD(TAG, "rom_code %s", rom_code_s); 407 | } 408 | else 409 | { 410 | status = OWB_STATUS_DEVICE_NOT_RESPONDING; 411 | ESP_LOGE(TAG, "ds18b20 device not responding"); 412 | } 413 | } 414 | 415 | return status; 416 | } 417 | 418 | owb_status owb_verify_rom(const OneWireBus * bus, OneWireBus_ROMCode rom_code, bool * is_present) 419 | { 420 | owb_status status = OWB_STATUS_NOT_SET; 421 | bool result = false; 422 | 423 | if (!bus || !is_present) 424 | { 425 | status = OWB_STATUS_PARAMETER_NULL; 426 | } 427 | else if (!_is_init(bus)) 428 | { 429 | status = OWB_STATUS_NOT_INITIALIZED; 430 | } 431 | else 432 | { 433 | OneWireBus_SearchState state = { 434 | .rom_code = rom_code, 435 | .last_discrepancy = 64, 436 | .last_device_flag = false, 437 | }; 438 | 439 | bool is_found = false; 440 | _search(bus, &state, &is_found); 441 | if (is_found) 442 | { 443 | result = true; 444 | for (int i = 0; i < sizeof(state.rom_code.bytes) && result; ++i) 445 | { 446 | result = rom_code.bytes[i] == state.rom_code.bytes[i]; 447 | ESP_LOGD(TAG, "%02x %02x", rom_code.bytes[i], state.rom_code.bytes[i]); 448 | } 449 | is_found = result; 450 | } 451 | ESP_LOGD(TAG, "state.last_discrepancy %d, state.last_device_flag %d, is_found %d", 452 | state.last_discrepancy, state.last_device_flag, is_found); 453 | 454 | ESP_LOGD(TAG, "rom code %sfound", result ? "" : "not "); 455 | *is_present = result; 456 | status = OWB_STATUS_OK; 457 | } 458 | 459 | return status; 460 | } 461 | 462 | owb_status owb_reset(const OneWireBus * bus, bool * a_device_present) 463 | { 464 | owb_status status = OWB_STATUS_NOT_SET; 465 | 466 | if (!bus || !a_device_present) 467 | { 468 | status = OWB_STATUS_PARAMETER_NULL; 469 | } 470 | else if(!_is_init(bus)) 471 | { 472 | status = OWB_STATUS_NOT_INITIALIZED; 473 | } 474 | else 475 | { 476 | status = bus->driver->reset(bus, a_device_present); 477 | } 478 | 479 | return status; 480 | } 481 | 482 | owb_status owb_read_bit(const OneWireBus * bus, uint8_t * out) 483 | { 484 | owb_status status = OWB_STATUS_NOT_SET; 485 | 486 | if (!bus || !out) 487 | { 488 | status = OWB_STATUS_PARAMETER_NULL; 489 | } 490 | else if (!_is_init(bus)) 491 | { 492 | status = OWB_STATUS_NOT_INITIALIZED; 493 | } 494 | else 495 | { 496 | bus->driver->read_bits(bus, out, 1); 497 | ESP_LOGD(TAG, "owb_read_bit: %02x", *out); 498 | status = OWB_STATUS_OK; 499 | } 500 | 501 | return status; 502 | } 503 | 504 | owb_status owb_read_byte(const OneWireBus * bus, uint8_t * out) 505 | { 506 | owb_status status = OWB_STATUS_NOT_SET; 507 | 508 | if (!bus || !out) 509 | { 510 | status = OWB_STATUS_PARAMETER_NULL; 511 | } 512 | else if (!_is_init(bus)) 513 | { 514 | status = OWB_STATUS_NOT_INITIALIZED; 515 | } 516 | else 517 | { 518 | bus->driver->read_bits(bus, out, 8); 519 | ESP_LOGD(TAG, "owb_read_byte: %02x", *out); 520 | status = OWB_STATUS_OK; 521 | } 522 | 523 | return status; 524 | } 525 | 526 | owb_status owb_read_bytes(const OneWireBus * bus, uint8_t * buffer, unsigned int len) 527 | { 528 | owb_status status = OWB_STATUS_NOT_SET; 529 | 530 | if (!bus || !buffer) 531 | { 532 | status = OWB_STATUS_PARAMETER_NULL; 533 | } 534 | else if (!_is_init(bus)) 535 | { 536 | status = OWB_STATUS_NOT_INITIALIZED; 537 | } 538 | else 539 | { 540 | for (int i = 0; i < len; ++i) 541 | { 542 | uint8_t out; 543 | bus->driver->read_bits(bus, &out, 8); 544 | buffer[i] = out; 545 | } 546 | 547 | ESP_LOGD(TAG, "owb_read_bytes, len %d:", len); 548 | ESP_LOG_BUFFER_HEX_LEVEL(TAG, buffer, len, ESP_LOG_DEBUG); 549 | 550 | status = OWB_STATUS_OK; 551 | } 552 | 553 | return status; 554 | } 555 | 556 | owb_status owb_write_bit(const OneWireBus * bus, const uint8_t bit) 557 | { 558 | owb_status status = OWB_STATUS_NOT_SET; 559 | 560 | if (!bus) 561 | { 562 | status = OWB_STATUS_PARAMETER_NULL; 563 | } 564 | else if (!_is_init(bus)) 565 | { 566 | status = OWB_STATUS_NOT_INITIALIZED; 567 | } 568 | else 569 | { 570 | ESP_LOGD(TAG, "owb_write_bit: %02x", bit); 571 | bus->driver->write_bits(bus, bit & 0x01u, 1); 572 | status = OWB_STATUS_OK; 573 | } 574 | 575 | return status; 576 | } 577 | 578 | owb_status owb_write_byte(const OneWireBus * bus, uint8_t data) 579 | { 580 | owb_status status = OWB_STATUS_NOT_SET; 581 | 582 | if (!bus) 583 | { 584 | status = OWB_STATUS_PARAMETER_NULL; 585 | } 586 | else if (!_is_init(bus)) 587 | { 588 | status = OWB_STATUS_NOT_INITIALIZED; 589 | } 590 | else 591 | { 592 | ESP_LOGD(TAG, "owb_write_byte: %02x", data); 593 | bus->driver->write_bits(bus, data, 8); 594 | status = OWB_STATUS_OK; 595 | } 596 | 597 | return status; 598 | } 599 | 600 | owb_status owb_write_bytes(const OneWireBus * bus, const uint8_t * buffer, size_t len) 601 | { 602 | owb_status status = OWB_STATUS_NOT_SET; 603 | 604 | if (!bus || !buffer) 605 | { 606 | status = OWB_STATUS_PARAMETER_NULL; 607 | } 608 | else if (!_is_init(bus)) 609 | { 610 | status = OWB_STATUS_NOT_INITIALIZED; 611 | } 612 | else 613 | { 614 | ESP_LOGD(TAG, "owb_write_bytes, len %d:", len); 615 | ESP_LOG_BUFFER_HEX_LEVEL(TAG, buffer, len, ESP_LOG_DEBUG); 616 | 617 | for (int i = 0; i < len; i++) 618 | { 619 | bus->driver->write_bits(bus, buffer[i], 8); 620 | } 621 | 622 | status = OWB_STATUS_OK; 623 | } 624 | 625 | return status; 626 | } 627 | 628 | owb_status owb_write_rom_code(const OneWireBus * bus, OneWireBus_ROMCode rom_code) 629 | { 630 | owb_status status = OWB_STATUS_NOT_SET; 631 | 632 | if (!bus) 633 | { 634 | status = OWB_STATUS_PARAMETER_NULL; 635 | } 636 | else if (!_is_init(bus)) 637 | { 638 | status = OWB_STATUS_NOT_INITIALIZED; 639 | } 640 | else 641 | { 642 | owb_write_bytes(bus, (uint8_t*)&rom_code, sizeof(rom_code)); 643 | status = OWB_STATUS_OK; 644 | } 645 | 646 | return status; 647 | } 648 | 649 | uint8_t owb_crc8_byte(uint8_t crc, uint8_t data) 650 | { 651 | return _calc_crc(crc, data); 652 | } 653 | 654 | uint8_t owb_crc8_bytes(uint8_t crc, const uint8_t * data, size_t len) 655 | { 656 | return _calc_crc_block(crc, data, len); 657 | } 658 | 659 | owb_status owb_search_first(const OneWireBus * bus, OneWireBus_SearchState * state, bool * found_device) 660 | { 661 | bool result; 662 | owb_status status = OWB_STATUS_NOT_SET; 663 | 664 | if (!bus || !state || !found_device) 665 | { 666 | status = OWB_STATUS_PARAMETER_NULL; 667 | } 668 | else if (!_is_init(bus)) 669 | { 670 | status = OWB_STATUS_NOT_INITIALIZED; 671 | } 672 | else 673 | { 674 | memset(&state->rom_code, 0, sizeof(state->rom_code)); 675 | state->last_discrepancy = 0; 676 | state->last_family_discrepancy = 0; 677 | state->last_device_flag = false; 678 | _search(bus, state, &result); 679 | status = OWB_STATUS_OK; 680 | 681 | *found_device = result; 682 | } 683 | 684 | return status; 685 | } 686 | 687 | owb_status owb_search_next(const OneWireBus * bus, OneWireBus_SearchState * state, bool * found_device) 688 | { 689 | owb_status status = OWB_STATUS_NOT_SET; 690 | bool result = false; 691 | 692 | if (!bus || !state || !found_device) 693 | { 694 | status = OWB_STATUS_PARAMETER_NULL; 695 | } 696 | else if (!_is_init(bus)) 697 | { 698 | status = OWB_STATUS_NOT_INITIALIZED; 699 | } 700 | else 701 | { 702 | _search(bus, state, &result); 703 | status = OWB_STATUS_OK; 704 | 705 | *found_device = result; 706 | } 707 | 708 | return status; 709 | } 710 | 711 | char * owb_string_from_rom_code(OneWireBus_ROMCode rom_code, char * buffer, size_t len) 712 | { 713 | for (int i = sizeof(rom_code.bytes) - 1; i >= 0; i--) 714 | { 715 | sprintf(buffer, "%02x", rom_code.bytes[i]); 716 | buffer += 2; 717 | } 718 | return buffer; 719 | } 720 | 721 | owb_status owb_set_strong_pullup(const OneWireBus * bus, bool enable) 722 | { 723 | owb_status status = OWB_STATUS_NOT_SET; 724 | 725 | if (!bus) 726 | { 727 | status = OWB_STATUS_PARAMETER_NULL; 728 | } 729 | else if (!_is_init(bus)) 730 | { 731 | status = OWB_STATUS_NOT_INITIALIZED; 732 | } 733 | else 734 | { 735 | if (bus->use_parasitic_power && bus->strong_pullup_gpio != GPIO_NUM_NC) 736 | { 737 | gpio_set_level(bus->strong_pullup_gpio, enable ? 1 : 0); 738 | ESP_LOGD(TAG, "strong pullup GPIO %d", enable); 739 | } // else ignore 740 | 741 | status = OWB_STATUS_OK; 742 | } 743 | 744 | return status; 745 | } 746 | -------------------------------------------------------------------------------- /doc/Doxyfile: -------------------------------------------------------------------------------- 1 | # Doxyfile 1.8.13 2 | 3 | # This file describes the settings to be used by the documentation system 4 | # doxygen (www.doxygen.org) for a project. 5 | # 6 | # All text after a double hash (##) is considered a comment and is placed in 7 | # front of the TAG it is preceding. 8 | # 9 | # All text after a single hash (#) is considered a comment and will be ignored. 10 | # The format is: 11 | # TAG = value [value, ...] 12 | # For lists, items can also be appended using: 13 | # TAG += value [value, ...] 14 | # Values that contain spaces should be placed between quotes (\" \"). 15 | 16 | #--------------------------------------------------------------------------- 17 | # Project related configuration options 18 | #--------------------------------------------------------------------------- 19 | 20 | # This tag specifies the encoding used for all characters in the config file 21 | # that follow. The default is UTF-8 which is also the encoding used for all text 22 | # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv 23 | # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv 24 | # for the list of possible encodings. 25 | # The default value is: UTF-8. 26 | 27 | DOXYFILE_ENCODING = UTF-8 28 | 29 | # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by 30 | # double-quotes, unless you are using Doxywizard) that should identify the 31 | # project for which the documentation is generated. This name is used in the 32 | # title of most generated pages and in a few other places. 33 | # The default value is: My Project. 34 | 35 | PROJECT_NAME = "esp32-owb" 36 | 37 | # The PROJECT_NUMBER tag can be used to enter a project or revision number. This 38 | # could be handy for archiving the generated documentation or if some version 39 | # control system is used. 40 | 41 | PROJECT_NUMBER = 42 | 43 | # Using the PROJECT_BRIEF tag one can provide an optional one line description 44 | # for a project that appears at the top of each page and should give viewer a 45 | # quick idea about the purpose of the project. Keep the description short. 46 | 47 | PROJECT_BRIEF = "ESP32-compatible C library for Maxim Integrated 1-Wire Bus." 48 | 49 | # With the PROJECT_LOGO tag one can specify a logo or an icon that is included 50 | # in the documentation. The maximum height of the logo should not exceed 55 51 | # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy 52 | # the logo to the output directory. 53 | 54 | PROJECT_LOGO = 55 | 56 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path 57 | # into which the generated documentation will be written. If a relative path is 58 | # entered, it will be relative to the location where doxygen was started. If 59 | # left blank the current directory will be used. 60 | 61 | OUTPUT_DIRECTORY = 62 | 63 | # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- 64 | # directories (in 2 levels) under the output directory of each output format and 65 | # will distribute the generated files over these directories. Enabling this 66 | # option can be useful when feeding doxygen a huge amount of source files, where 67 | # putting all generated files in the same directory would otherwise causes 68 | # performance problems for the file system. 69 | # The default value is: NO. 70 | 71 | CREATE_SUBDIRS = NO 72 | 73 | # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII 74 | # characters to appear in the names of generated files. If set to NO, non-ASCII 75 | # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode 76 | # U+3044. 77 | # The default value is: NO. 78 | 79 | ALLOW_UNICODE_NAMES = NO 80 | 81 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all 82 | # documentation generated by doxygen is written. Doxygen will use this 83 | # information to generate all constant output in the proper language. 84 | # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, 85 | # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), 86 | # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, 87 | # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), 88 | # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, 89 | # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, 90 | # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, 91 | # Ukrainian and Vietnamese. 92 | # The default value is: English. 93 | 94 | OUTPUT_LANGUAGE = English 95 | 96 | # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member 97 | # descriptions after the members that are listed in the file and class 98 | # documentation (similar to Javadoc). Set to NO to disable this. 99 | # The default value is: YES. 100 | 101 | BRIEF_MEMBER_DESC = YES 102 | 103 | # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief 104 | # description of a member or function before the detailed description 105 | # 106 | # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 107 | # brief descriptions will be completely suppressed. 108 | # The default value is: YES. 109 | 110 | REPEAT_BRIEF = YES 111 | 112 | # This tag implements a quasi-intelligent brief description abbreviator that is 113 | # used to form the text in various listings. Each string in this list, if found 114 | # as the leading text of the brief description, will be stripped from the text 115 | # and the result, after processing the whole list, is used as the annotated 116 | # text. Otherwise, the brief description is used as-is. If left blank, the 117 | # following values are used ($name is automatically replaced with the name of 118 | # the entity):The $name class, The $name widget, The $name file, is, provides, 119 | # specifies, contains, represents, a, an and the. 120 | 121 | ABBREVIATE_BRIEF = "The $name class" \ 122 | "The $name widget" \ 123 | "The $name file" \ 124 | is \ 125 | provides \ 126 | specifies \ 127 | contains \ 128 | represents \ 129 | a \ 130 | an \ 131 | the 132 | 133 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 134 | # doxygen will generate a detailed section even if there is only a brief 135 | # description. 136 | # The default value is: NO. 137 | 138 | ALWAYS_DETAILED_SEC = NO 139 | 140 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 141 | # inherited members of a class in the documentation of that class as if those 142 | # members were ordinary class members. Constructors, destructors and assignment 143 | # operators of the base classes will not be shown. 144 | # The default value is: NO. 145 | 146 | INLINE_INHERITED_MEMB = NO 147 | 148 | # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path 149 | # before files name in the file list and in the header files. If set to NO the 150 | # shortest path that makes the file name unique will be used 151 | # The default value is: YES. 152 | 153 | FULL_PATH_NAMES = YES 154 | 155 | # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. 156 | # Stripping is only done if one of the specified strings matches the left-hand 157 | # part of the path. The tag can be used to show relative paths in the file list. 158 | # If left blank the directory from which doxygen is run is used as the path to 159 | # strip. 160 | # 161 | # Note that you can specify absolute paths here, but also relative paths, which 162 | # will be relative from the directory where doxygen is started. 163 | # This tag requires that the tag FULL_PATH_NAMES is set to YES. 164 | 165 | STRIP_FROM_PATH = 166 | 167 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the 168 | # path mentioned in the documentation of a class, which tells the reader which 169 | # header file to include in order to use a class. If left blank only the name of 170 | # the header file containing the class definition is used. Otherwise one should 171 | # specify the list of include paths that are normally passed to the compiler 172 | # using the -I flag. 173 | 174 | STRIP_FROM_INC_PATH = 175 | 176 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but 177 | # less readable) file names. This can be useful is your file systems doesn't 178 | # support long names like on DOS, Mac, or CD-ROM. 179 | # The default value is: NO. 180 | 181 | SHORT_NAMES = NO 182 | 183 | # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the 184 | # first line (until the first dot) of a Javadoc-style comment as the brief 185 | # description. If set to NO, the Javadoc-style will behave just like regular Qt- 186 | # style comments (thus requiring an explicit @brief command for a brief 187 | # description.) 188 | # The default value is: NO. 189 | 190 | JAVADOC_AUTOBRIEF = NO 191 | 192 | # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first 193 | # line (until the first dot) of a Qt-style comment as the brief description. If 194 | # set to NO, the Qt-style will behave just like regular Qt-style comments (thus 195 | # requiring an explicit \brief command for a brief description.) 196 | # The default value is: NO. 197 | 198 | QT_AUTOBRIEF = NO 199 | 200 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a 201 | # multi-line C++ special comment block (i.e. a block of //! or /// comments) as 202 | # a brief description. This used to be the default behavior. The new default is 203 | # to treat a multi-line C++ comment block as a detailed description. Set this 204 | # tag to YES if you prefer the old behavior instead. 205 | # 206 | # Note that setting this tag to YES also means that rational rose comments are 207 | # not recognized any more. 208 | # The default value is: NO. 209 | 210 | MULTILINE_CPP_IS_BRIEF = NO 211 | 212 | # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the 213 | # documentation from any documented member that it re-implements. 214 | # The default value is: YES. 215 | 216 | INHERIT_DOCS = YES 217 | 218 | # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new 219 | # page for each member. If set to NO, the documentation of a member will be part 220 | # of the file/class/namespace that contains it. 221 | # The default value is: NO. 222 | 223 | SEPARATE_MEMBER_PAGES = NO 224 | 225 | # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen 226 | # uses this value to replace tabs by spaces in code fragments. 227 | # Minimum value: 1, maximum value: 16, default value: 4. 228 | 229 | TAB_SIZE = 4 230 | 231 | # This tag can be used to specify a number of aliases that act as commands in 232 | # the documentation. An alias has the form: 233 | # name=value 234 | # For example adding 235 | # "sideeffect=@par Side Effects:\n" 236 | # will allow you to put the command \sideeffect (or @sideeffect) in the 237 | # documentation, which will result in a user-defined paragraph with heading 238 | # "Side Effects:". You can put \n's in the value part of an alias to insert 239 | # newlines. 240 | 241 | ALIASES = 242 | 243 | # This tag can be used to specify a number of word-keyword mappings (TCL only). 244 | # A mapping has the form "name=value". For example adding "class=itcl::class" 245 | # will allow you to use the command class in the itcl::class meaning. 246 | 247 | TCL_SUBST = 248 | 249 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 250 | # only. Doxygen will then generate output that is more tailored for C. For 251 | # instance, some of the names that are used will be different. The list of all 252 | # members will be omitted, etc. 253 | # The default value is: NO. 254 | 255 | OPTIMIZE_OUTPUT_FOR_C = YES 256 | 257 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or 258 | # Python sources only. Doxygen will then generate output that is more tailored 259 | # for that language. For instance, namespaces will be presented as packages, 260 | # qualified scopes will look different, etc. 261 | # The default value is: NO. 262 | 263 | OPTIMIZE_OUTPUT_JAVA = NO 264 | 265 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 266 | # sources. Doxygen will then generate output that is tailored for Fortran. 267 | # The default value is: NO. 268 | 269 | OPTIMIZE_FOR_FORTRAN = NO 270 | 271 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 272 | # sources. Doxygen will then generate output that is tailored for VHDL. 273 | # The default value is: NO. 274 | 275 | OPTIMIZE_OUTPUT_VHDL = NO 276 | 277 | # Doxygen selects the parser to use depending on the extension of the files it 278 | # parses. With this tag you can assign which parser to use for a given 279 | # extension. Doxygen has a built-in mapping, but you can override or extend it 280 | # using this tag. The format is ext=language, where ext is a file extension, and 281 | # language is one of the parsers supported by doxygen: IDL, Java, Javascript, 282 | # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: 283 | # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: 284 | # Fortran. In the later case the parser tries to guess whether the code is fixed 285 | # or free formatted code, this is the default for Fortran type files), VHDL. For 286 | # instance to make doxygen treat .inc files as Fortran files (default is PHP), 287 | # and .f files as C (default is Fortran), use: inc=Fortran f=C. 288 | # 289 | # Note: For files without extension you can use no_extension as a placeholder. 290 | # 291 | # Note that for custom extensions you also need to set FILE_PATTERNS otherwise 292 | # the files are not read by doxygen. 293 | 294 | EXTENSION_MAPPING = 295 | 296 | # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments 297 | # according to the Markdown format, which allows for more readable 298 | # documentation. See http://daringfireball.net/projects/markdown/ for details. 299 | # The output of markdown processing is further processed by doxygen, so you can 300 | # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in 301 | # case of backward compatibilities issues. 302 | # The default value is: YES. 303 | 304 | MARKDOWN_SUPPORT = YES 305 | 306 | # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up 307 | # to that level are automatically included in the table of contents, even if 308 | # they do not have an id attribute. 309 | # Note: This feature currently applies only to Markdown headings. 310 | # Minimum value: 0, maximum value: 99, default value: 0. 311 | # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. 312 | 313 | TOC_INCLUDE_HEADINGS = 0 314 | 315 | # When enabled doxygen tries to link words that correspond to documented 316 | # classes, or namespaces to their corresponding documentation. Such a link can 317 | # be prevented in individual cases by putting a % sign in front of the word or 318 | # globally by setting AUTOLINK_SUPPORT to NO. 319 | # The default value is: YES. 320 | 321 | AUTOLINK_SUPPORT = YES 322 | 323 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 324 | # to include (a tag file for) the STL sources as input, then you should set this 325 | # tag to YES in order to let doxygen match functions declarations and 326 | # definitions whose arguments contain STL classes (e.g. func(std::string); 327 | # versus func(std::string) {}). This also make the inheritance and collaboration 328 | # diagrams that involve STL classes more complete and accurate. 329 | # The default value is: NO. 330 | 331 | BUILTIN_STL_SUPPORT = NO 332 | 333 | # If you use Microsoft's C++/CLI language, you should set this option to YES to 334 | # enable parsing support. 335 | # The default value is: NO. 336 | 337 | CPP_CLI_SUPPORT = NO 338 | 339 | # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: 340 | # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen 341 | # will parse them like normal C++ but will assume all classes use public instead 342 | # of private inheritance when no explicit protection keyword is present. 343 | # The default value is: NO. 344 | 345 | SIP_SUPPORT = NO 346 | 347 | # For Microsoft's IDL there are propget and propput attributes to indicate 348 | # getter and setter methods for a property. Setting this option to YES will make 349 | # doxygen to replace the get and set methods by a property in the documentation. 350 | # This will only work if the methods are indeed getting or setting a simple 351 | # type. If this is not the case, or you want to show the methods anyway, you 352 | # should set this option to NO. 353 | # The default value is: YES. 354 | 355 | IDL_PROPERTY_SUPPORT = YES 356 | 357 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 358 | # tag is set to YES then doxygen will reuse the documentation of the first 359 | # member in the group (if any) for the other members of the group. By default 360 | # all members of a group must be documented explicitly. 361 | # The default value is: NO. 362 | 363 | DISTRIBUTE_GROUP_DOC = NO 364 | 365 | # If one adds a struct or class to a group and this option is enabled, then also 366 | # any nested class or struct is added to the same group. By default this option 367 | # is disabled and one has to add nested compounds explicitly via \ingroup. 368 | # The default value is: NO. 369 | 370 | GROUP_NESTED_COMPOUNDS = NO 371 | 372 | # Set the SUBGROUPING tag to YES to allow class member groups of the same type 373 | # (for instance a group of public functions) to be put as a subgroup of that 374 | # type (e.g. under the Public Functions section). Set it to NO to prevent 375 | # subgrouping. Alternatively, this can be done per class using the 376 | # \nosubgrouping command. 377 | # The default value is: YES. 378 | 379 | SUBGROUPING = YES 380 | 381 | # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions 382 | # are shown inside the group in which they are included (e.g. using \ingroup) 383 | # instead of on a separate page (for HTML and Man pages) or section (for LaTeX 384 | # and RTF). 385 | # 386 | # Note that this feature does not work in combination with 387 | # SEPARATE_MEMBER_PAGES. 388 | # The default value is: NO. 389 | 390 | INLINE_GROUPED_CLASSES = NO 391 | 392 | # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions 393 | # with only public data fields or simple typedef fields will be shown inline in 394 | # the documentation of the scope in which they are defined (i.e. file, 395 | # namespace, or group documentation), provided this scope is documented. If set 396 | # to NO, structs, classes, and unions are shown on a separate page (for HTML and 397 | # Man pages) or section (for LaTeX and RTF). 398 | # The default value is: NO. 399 | 400 | INLINE_SIMPLE_STRUCTS = NO 401 | 402 | # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or 403 | # enum is documented as struct, union, or enum with the name of the typedef. So 404 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct 405 | # with name TypeT. When disabled the typedef will appear as a member of a file, 406 | # namespace, or class. And the struct will be named TypeS. This can typically be 407 | # useful for C code in case the coding convention dictates that all compound 408 | # types are typedef'ed and only the typedef is referenced, never the tag name. 409 | # The default value is: NO. 410 | 411 | TYPEDEF_HIDES_STRUCT = NO 412 | 413 | # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This 414 | # cache is used to resolve symbols given their name and scope. Since this can be 415 | # an expensive process and often the same symbol appears multiple times in the 416 | # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small 417 | # doxygen will become slower. If the cache is too large, memory is wasted. The 418 | # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range 419 | # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 420 | # symbols. At the end of a run doxygen will report the cache usage and suggest 421 | # the optimal cache size from a speed point of view. 422 | # Minimum value: 0, maximum value: 9, default value: 0. 423 | 424 | LOOKUP_CACHE_SIZE = 0 425 | 426 | #--------------------------------------------------------------------------- 427 | # Build related configuration options 428 | #--------------------------------------------------------------------------- 429 | 430 | # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in 431 | # documentation are documented, even if no documentation was available. Private 432 | # class members and static file members will be hidden unless the 433 | # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. 434 | # Note: This will also disable the warnings about undocumented members that are 435 | # normally produced when WARNINGS is set to YES. 436 | # The default value is: NO. 437 | 438 | EXTRACT_ALL = NO 439 | 440 | # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will 441 | # be included in the documentation. 442 | # The default value is: NO. 443 | 444 | EXTRACT_PRIVATE = NO 445 | 446 | # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal 447 | # scope will be included in the documentation. 448 | # The default value is: NO. 449 | 450 | EXTRACT_PACKAGE = NO 451 | 452 | # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be 453 | # included in the documentation. 454 | # The default value is: NO. 455 | 456 | EXTRACT_STATIC = NO 457 | 458 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined 459 | # locally in source files will be included in the documentation. If set to NO, 460 | # only classes defined in header files are included. Does not have any effect 461 | # for Java sources. 462 | # The default value is: YES. 463 | 464 | EXTRACT_LOCAL_CLASSES = YES 465 | 466 | # This flag is only useful for Objective-C code. If set to YES, local methods, 467 | # which are defined in the implementation section but not in the interface are 468 | # included in the documentation. If set to NO, only methods in the interface are 469 | # included. 470 | # The default value is: NO. 471 | 472 | EXTRACT_LOCAL_METHODS = NO 473 | 474 | # If this flag is set to YES, the members of anonymous namespaces will be 475 | # extracted and appear in the documentation as a namespace called 476 | # 'anonymous_namespace{file}', where file will be replaced with the base name of 477 | # the file that contains the anonymous namespace. By default anonymous namespace 478 | # are hidden. 479 | # The default value is: NO. 480 | 481 | EXTRACT_ANON_NSPACES = NO 482 | 483 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all 484 | # undocumented members inside documented classes or files. If set to NO these 485 | # members will be included in the various overviews, but no documentation 486 | # section is generated. This option has no effect if EXTRACT_ALL is enabled. 487 | # The default value is: NO. 488 | 489 | HIDE_UNDOC_MEMBERS = NO 490 | 491 | # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all 492 | # undocumented classes that are normally visible in the class hierarchy. If set 493 | # to NO, these classes will be included in the various overviews. This option 494 | # has no effect if EXTRACT_ALL is enabled. 495 | # The default value is: NO. 496 | 497 | HIDE_UNDOC_CLASSES = NO 498 | 499 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend 500 | # (class|struct|union) declarations. If set to NO, these declarations will be 501 | # included in the documentation. 502 | # The default value is: NO. 503 | 504 | HIDE_FRIEND_COMPOUNDS = NO 505 | 506 | # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any 507 | # documentation blocks found inside the body of a function. If set to NO, these 508 | # blocks will be appended to the function's detailed documentation block. 509 | # The default value is: NO. 510 | 511 | HIDE_IN_BODY_DOCS = NO 512 | 513 | # The INTERNAL_DOCS tag determines if documentation that is typed after a 514 | # \internal command is included. If the tag is set to NO then the documentation 515 | # will be excluded. Set it to YES to include the internal documentation. 516 | # The default value is: NO. 517 | 518 | INTERNAL_DOCS = NO 519 | 520 | # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file 521 | # names in lower-case letters. If set to YES, upper-case letters are also 522 | # allowed. This is useful if you have classes or files whose names only differ 523 | # in case and if your file system supports case sensitive file names. Windows 524 | # and Mac users are advised to set this option to NO. 525 | # The default value is: system dependent. 526 | 527 | CASE_SENSE_NAMES = NO 528 | 529 | # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with 530 | # their full class and namespace scopes in the documentation. If set to YES, the 531 | # scope will be hidden. 532 | # The default value is: NO. 533 | 534 | HIDE_SCOPE_NAMES = NO 535 | 536 | # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will 537 | # append additional text to a page's title, such as Class Reference. If set to 538 | # YES the compound reference will be hidden. 539 | # The default value is: NO. 540 | 541 | HIDE_COMPOUND_REFERENCE= NO 542 | 543 | # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of 544 | # the files that are included by a file in the documentation of that file. 545 | # The default value is: YES. 546 | 547 | SHOW_INCLUDE_FILES = YES 548 | 549 | # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each 550 | # grouped member an include statement to the documentation, telling the reader 551 | # which file to include in order to use the member. 552 | # The default value is: NO. 553 | 554 | SHOW_GROUPED_MEMB_INC = NO 555 | 556 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include 557 | # files with double quotes in the documentation rather than with sharp brackets. 558 | # The default value is: NO. 559 | 560 | FORCE_LOCAL_INCLUDES = NO 561 | 562 | # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the 563 | # documentation for inline members. 564 | # The default value is: YES. 565 | 566 | INLINE_INFO = YES 567 | 568 | # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the 569 | # (detailed) documentation of file and class members alphabetically by member 570 | # name. If set to NO, the members will appear in declaration order. 571 | # The default value is: YES. 572 | 573 | SORT_MEMBER_DOCS = NO 574 | 575 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief 576 | # descriptions of file, namespace and class members alphabetically by member 577 | # name. If set to NO, the members will appear in declaration order. Note that 578 | # this will also influence the order of the classes in the class list. 579 | # The default value is: NO. 580 | 581 | SORT_BRIEF_DOCS = NO 582 | 583 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the 584 | # (brief and detailed) documentation of class members so that constructors and 585 | # destructors are listed first. If set to NO the constructors will appear in the 586 | # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. 587 | # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief 588 | # member documentation. 589 | # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting 590 | # detailed member documentation. 591 | # The default value is: NO. 592 | 593 | SORT_MEMBERS_CTORS_1ST = NO 594 | 595 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy 596 | # of group names into alphabetical order. If set to NO the group names will 597 | # appear in their defined order. 598 | # The default value is: NO. 599 | 600 | SORT_GROUP_NAMES = NO 601 | 602 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by 603 | # fully-qualified names, including namespaces. If set to NO, the class list will 604 | # be sorted only by class name, not including the namespace part. 605 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 606 | # Note: This option applies only to the class list, not to the alphabetical 607 | # list. 608 | # The default value is: NO. 609 | 610 | SORT_BY_SCOPE_NAME = NO 611 | 612 | # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper 613 | # type resolution of all parameters of a function it will reject a match between 614 | # the prototype and the implementation of a member function even if there is 615 | # only one candidate or it is obvious which candidate to choose by doing a 616 | # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still 617 | # accept a match between prototype and implementation in such cases. 618 | # The default value is: NO. 619 | 620 | STRICT_PROTO_MATCHING = NO 621 | 622 | # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo 623 | # list. This list is created by putting \todo commands in the documentation. 624 | # The default value is: YES. 625 | 626 | GENERATE_TODOLIST = YES 627 | 628 | # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test 629 | # list. This list is created by putting \test commands in the documentation. 630 | # The default value is: YES. 631 | 632 | GENERATE_TESTLIST = YES 633 | 634 | # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug 635 | # list. This list is created by putting \bug commands in the documentation. 636 | # The default value is: YES. 637 | 638 | GENERATE_BUGLIST = YES 639 | 640 | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) 641 | # the deprecated list. This list is created by putting \deprecated commands in 642 | # the documentation. 643 | # The default value is: YES. 644 | 645 | GENERATE_DEPRECATEDLIST= YES 646 | 647 | # The ENABLED_SECTIONS tag can be used to enable conditional documentation 648 | # sections, marked by \if ... \endif and \cond 649 | # ... \endcond blocks. 650 | 651 | ENABLED_SECTIONS = 652 | 653 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the 654 | # initial value of a variable or macro / define can have for it to appear in the 655 | # documentation. If the initializer consists of more lines than specified here 656 | # it will be hidden. Use a value of 0 to hide initializers completely. The 657 | # appearance of the value of individual variables and macros / defines can be 658 | # controlled using \showinitializer or \hideinitializer command in the 659 | # documentation regardless of this setting. 660 | # Minimum value: 0, maximum value: 10000, default value: 30. 661 | 662 | MAX_INITIALIZER_LINES = 30 663 | 664 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at 665 | # the bottom of the documentation of classes and structs. If set to YES, the 666 | # list will mention the files that were used to generate the documentation. 667 | # The default value is: YES. 668 | 669 | SHOW_USED_FILES = YES 670 | 671 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This 672 | # will remove the Files entry from the Quick Index and from the Folder Tree View 673 | # (if specified). 674 | # The default value is: YES. 675 | 676 | SHOW_FILES = YES 677 | 678 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces 679 | # page. This will remove the Namespaces entry from the Quick Index and from the 680 | # Folder Tree View (if specified). 681 | # The default value is: YES. 682 | 683 | SHOW_NAMESPACES = YES 684 | 685 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that 686 | # doxygen should invoke to get the current version for each file (typically from 687 | # the version control system). Doxygen will invoke the program by executing (via 688 | # popen()) the command command input-file, where command is the value of the 689 | # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided 690 | # by doxygen. Whatever the program writes to standard output is used as the file 691 | # version. For an example see the documentation. 692 | 693 | FILE_VERSION_FILTER = 694 | 695 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 696 | # by doxygen. The layout file controls the global structure of the generated 697 | # output files in an output format independent way. To create the layout file 698 | # that represents doxygen's defaults, run doxygen with the -l option. You can 699 | # optionally specify a file name after the option, if omitted DoxygenLayout.xml 700 | # will be used as the name of the layout file. 701 | # 702 | # Note that if you run doxygen from a directory containing a file called 703 | # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE 704 | # tag is left empty. 705 | 706 | LAYOUT_FILE = 707 | 708 | # The CITE_BIB_FILES tag can be used to specify one or more bib files containing 709 | # the reference definitions. This must be a list of .bib files. The .bib 710 | # extension is automatically appended if omitted. This requires the bibtex tool 711 | # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. 712 | # For LaTeX the style of the bibliography can be controlled using 713 | # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the 714 | # search path. See also \cite for info how to create references. 715 | 716 | CITE_BIB_FILES = 717 | 718 | #--------------------------------------------------------------------------- 719 | # Configuration options related to warning and progress messages 720 | #--------------------------------------------------------------------------- 721 | 722 | # The QUIET tag can be used to turn on/off the messages that are generated to 723 | # standard output by doxygen. If QUIET is set to YES this implies that the 724 | # messages are off. 725 | # The default value is: NO. 726 | 727 | QUIET = NO 728 | 729 | # The WARNINGS tag can be used to turn on/off the warning messages that are 730 | # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES 731 | # this implies that the warnings are on. 732 | # 733 | # Tip: Turn warnings on while writing the documentation. 734 | # The default value is: YES. 735 | 736 | WARNINGS = YES 737 | 738 | # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate 739 | # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag 740 | # will automatically be disabled. 741 | # The default value is: YES. 742 | 743 | WARN_IF_UNDOCUMENTED = YES 744 | 745 | # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for 746 | # potential errors in the documentation, such as not documenting some parameters 747 | # in a documented function, or documenting parameters that don't exist or using 748 | # markup commands wrongly. 749 | # The default value is: YES. 750 | 751 | WARN_IF_DOC_ERROR = YES 752 | 753 | # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that 754 | # are documented, but have no documentation for their parameters or return 755 | # value. If set to NO, doxygen will only warn about wrong or incomplete 756 | # parameter documentation, but not about the absence of documentation. 757 | # The default value is: NO. 758 | 759 | WARN_NO_PARAMDOC = NO 760 | 761 | # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when 762 | # a warning is encountered. 763 | # The default value is: NO. 764 | 765 | WARN_AS_ERROR = NO 766 | 767 | # The WARN_FORMAT tag determines the format of the warning messages that doxygen 768 | # can produce. The string should contain the $file, $line, and $text tags, which 769 | # will be replaced by the file and line number from which the warning originated 770 | # and the warning text. Optionally the format may contain $version, which will 771 | # be replaced by the version of the file (if it could be obtained via 772 | # FILE_VERSION_FILTER) 773 | # The default value is: $file:$line: $text. 774 | 775 | WARN_FORMAT = "$file:$line: $text" 776 | 777 | # The WARN_LOGFILE tag can be used to specify a file to which warning and error 778 | # messages should be written. If left blank the output is written to standard 779 | # error (stderr). 780 | 781 | WARN_LOGFILE = 782 | 783 | #--------------------------------------------------------------------------- 784 | # Configuration options related to the input files 785 | #--------------------------------------------------------------------------- 786 | 787 | # The INPUT tag is used to specify the files and/or directories that contain 788 | # documented source files. You may enter file names like myfile.cpp or 789 | # directories like /usr/src/myproject. Separate the files or directories with 790 | # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING 791 | # Note: If this tag is empty the current directory is searched. 792 | 793 | INPUT = ../README.md \ 794 | ../include \ 795 | .. 796 | 797 | # This tag can be used to specify the character encoding of the source files 798 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses 799 | # libiconv (or the iconv built into libc) for the transcoding. See the libiconv 800 | # documentation (see: http://www.gnu.org/software/libiconv) for the list of 801 | # possible encodings. 802 | # The default value is: UTF-8. 803 | 804 | INPUT_ENCODING = UTF-8 805 | 806 | # If the value of the INPUT tag contains directories, you can use the 807 | # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and 808 | # *.h) to filter out the source-files in the directories. 809 | # 810 | # Note that for custom extensions or not directly supported extensions you also 811 | # need to set EXTENSION_MAPPING for the extension otherwise the files are not 812 | # read by doxygen. 813 | # 814 | # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, 815 | # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, 816 | # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, 817 | # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, 818 | # *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. 819 | 820 | FILE_PATTERNS = *.c \ 821 | *.cc \ 822 | *.cxx \ 823 | *.cpp \ 824 | *.c++ \ 825 | *.java \ 826 | *.ii \ 827 | *.ixx \ 828 | *.ipp \ 829 | *.i++ \ 830 | *.inl \ 831 | *.idl \ 832 | *.ddl \ 833 | *.odl \ 834 | *.h \ 835 | *.hh \ 836 | *.hxx \ 837 | *.hpp \ 838 | *.h++ \ 839 | *.cs \ 840 | *.d \ 841 | *.php \ 842 | *.php4 \ 843 | *.php5 \ 844 | *.phtml \ 845 | *.inc \ 846 | *.m \ 847 | *.markdown \ 848 | *.md \ 849 | *.mm \ 850 | *.dox \ 851 | *.py \ 852 | *.pyw \ 853 | *.f90 \ 854 | *.f95 \ 855 | *.f03 \ 856 | *.f08 \ 857 | *.f \ 858 | *.for \ 859 | *.tcl \ 860 | *.vhd \ 861 | *.vhdl \ 862 | *.ucf \ 863 | *.qsf 864 | 865 | # The RECURSIVE tag can be used to specify whether or not subdirectories should 866 | # be searched for input files as well. 867 | # The default value is: NO. 868 | 869 | RECURSIVE = NO 870 | 871 | # The EXCLUDE tag can be used to specify files and/or directories that should be 872 | # excluded from the INPUT source files. This way you can easily exclude a 873 | # subdirectory from a directory tree whose root is specified with the INPUT tag. 874 | # 875 | # Note that relative paths are relative to the directory from which doxygen is 876 | # run. 877 | 878 | EXCLUDE = 879 | 880 | # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 881 | # directories that are symbolic links (a Unix file system feature) are excluded 882 | # from the input. 883 | # The default value is: NO. 884 | 885 | EXCLUDE_SYMLINKS = NO 886 | 887 | # If the value of the INPUT tag contains directories, you can use the 888 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 889 | # certain files from those directories. 890 | # 891 | # Note that the wildcards are matched against the file with absolute path, so to 892 | # exclude all test directories for example use the pattern */test/* 893 | 894 | EXCLUDE_PATTERNS = 895 | 896 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 897 | # (namespaces, classes, functions, etc.) that should be excluded from the 898 | # output. The symbol name can be a fully qualified name, a word, or if the 899 | # wildcard * is used, a substring. Examples: ANamespace, AClass, 900 | # AClass::ANamespace, ANamespace::*Test 901 | # 902 | # Note that the wildcards are matched against the file with absolute path, so to 903 | # exclude all test directories use the pattern */test/* 904 | 905 | EXCLUDE_SYMBOLS = 906 | 907 | # The EXAMPLE_PATH tag can be used to specify one or more files or directories 908 | # that contain example code fragments that are included (see the \include 909 | # command). 910 | 911 | EXAMPLE_PATH = 912 | 913 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the 914 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and 915 | # *.h) to filter out the source-files in the directories. If left blank all 916 | # files are included. 917 | 918 | EXAMPLE_PATTERNS = * 919 | 920 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 921 | # searched for input files to be used with the \include or \dontinclude commands 922 | # irrespective of the value of the RECURSIVE tag. 923 | # The default value is: NO. 924 | 925 | EXAMPLE_RECURSIVE = NO 926 | 927 | # The IMAGE_PATH tag can be used to specify one or more files or directories 928 | # that contain images that are to be included in the documentation (see the 929 | # \image command). 930 | 931 | IMAGE_PATH = 932 | 933 | # The INPUT_FILTER tag can be used to specify a program that doxygen should 934 | # invoke to filter for each input file. Doxygen will invoke the filter program 935 | # by executing (via popen()) the command: 936 | # 937 | # 938 | # 939 | # where is the value of the INPUT_FILTER tag, and is the 940 | # name of an input file. Doxygen will then use the output that the filter 941 | # program writes to standard output. If FILTER_PATTERNS is specified, this tag 942 | # will be ignored. 943 | # 944 | # Note that the filter must not add or remove lines; it is applied before the 945 | # code is scanned, but not when the output code is generated. If lines are added 946 | # or removed, the anchors will not be placed correctly. 947 | # 948 | # Note that for custom extensions or not directly supported extensions you also 949 | # need to set EXTENSION_MAPPING for the extension otherwise the files are not 950 | # properly processed by doxygen. 951 | 952 | INPUT_FILTER = 953 | 954 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 955 | # basis. Doxygen will compare the file name with each pattern and apply the 956 | # filter if there is a match. The filters are a list of the form: pattern=filter 957 | # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how 958 | # filters are used. If the FILTER_PATTERNS tag is empty or if none of the 959 | # patterns match the file name, INPUT_FILTER is applied. 960 | # 961 | # Note that for custom extensions or not directly supported extensions you also 962 | # need to set EXTENSION_MAPPING for the extension otherwise the files are not 963 | # properly processed by doxygen. 964 | 965 | FILTER_PATTERNS = 966 | 967 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 968 | # INPUT_FILTER) will also be used to filter the input files that are used for 969 | # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). 970 | # The default value is: NO. 971 | 972 | FILTER_SOURCE_FILES = NO 973 | 974 | # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 975 | # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and 976 | # it is also possible to disable source filtering for a specific pattern using 977 | # *.ext= (so without naming a filter). 978 | # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. 979 | 980 | FILTER_SOURCE_PATTERNS = 981 | 982 | # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that 983 | # is part of the input, its contents will be placed on the main page 984 | # (index.html). This can be useful if you have a project on for instance GitHub 985 | # and want to reuse the introduction page also for the doxygen output. 986 | 987 | USE_MDFILE_AS_MAINPAGE = ../README.md 988 | 989 | #--------------------------------------------------------------------------- 990 | # Configuration options related to source browsing 991 | #--------------------------------------------------------------------------- 992 | 993 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will be 994 | # generated. Documented entities will be cross-referenced with these sources. 995 | # 996 | # Note: To get rid of all source code in the generated output, make sure that 997 | # also VERBATIM_HEADERS is set to NO. 998 | # The default value is: NO. 999 | 1000 | SOURCE_BROWSER = NO 1001 | 1002 | # Setting the INLINE_SOURCES tag to YES will include the body of functions, 1003 | # classes and enums directly into the documentation. 1004 | # The default value is: NO. 1005 | 1006 | INLINE_SOURCES = NO 1007 | 1008 | # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any 1009 | # special comment blocks from generated source code fragments. Normal C, C++ and 1010 | # Fortran comments will always remain visible. 1011 | # The default value is: YES. 1012 | 1013 | STRIP_CODE_COMMENTS = YES 1014 | 1015 | # If the REFERENCED_BY_RELATION tag is set to YES then for each documented 1016 | # function all documented functions referencing it will be listed. 1017 | # The default value is: NO. 1018 | 1019 | REFERENCED_BY_RELATION = NO 1020 | 1021 | # If the REFERENCES_RELATION tag is set to YES then for each documented function 1022 | # all documented entities called/used by that function will be listed. 1023 | # The default value is: NO. 1024 | 1025 | REFERENCES_RELATION = NO 1026 | 1027 | # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set 1028 | # to YES then the hyperlinks from functions in REFERENCES_RELATION and 1029 | # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will 1030 | # link to the documentation. 1031 | # The default value is: YES. 1032 | 1033 | REFERENCES_LINK_SOURCE = YES 1034 | 1035 | # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the 1036 | # source code will show a tooltip with additional information such as prototype, 1037 | # brief description and links to the definition and documentation. Since this 1038 | # will make the HTML file larger and loading of large files a bit slower, you 1039 | # can opt to disable this feature. 1040 | # The default value is: YES. 1041 | # This tag requires that the tag SOURCE_BROWSER is set to YES. 1042 | 1043 | SOURCE_TOOLTIPS = YES 1044 | 1045 | # If the USE_HTAGS tag is set to YES then the references to source code will 1046 | # point to the HTML generated by the htags(1) tool instead of doxygen built-in 1047 | # source browser. The htags tool is part of GNU's global source tagging system 1048 | # (see http://www.gnu.org/software/global/global.html). You will need version 1049 | # 4.8.6 or higher. 1050 | # 1051 | # To use it do the following: 1052 | # - Install the latest version of global 1053 | # - Enable SOURCE_BROWSER and USE_HTAGS in the config file 1054 | # - Make sure the INPUT points to the root of the source tree 1055 | # - Run doxygen as normal 1056 | # 1057 | # Doxygen will invoke htags (and that will in turn invoke gtags), so these 1058 | # tools must be available from the command line (i.e. in the search path). 1059 | # 1060 | # The result: instead of the source browser generated by doxygen, the links to 1061 | # source code will now point to the output of htags. 1062 | # The default value is: NO. 1063 | # This tag requires that the tag SOURCE_BROWSER is set to YES. 1064 | 1065 | USE_HTAGS = NO 1066 | 1067 | # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a 1068 | # verbatim copy of the header file for each class for which an include is 1069 | # specified. Set to NO to disable this. 1070 | # See also: Section \class. 1071 | # The default value is: YES. 1072 | 1073 | VERBATIM_HEADERS = YES 1074 | 1075 | # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the 1076 | # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the 1077 | # cost of reduced performance. This can be particularly helpful with template 1078 | # rich C++ code for which doxygen's built-in parser lacks the necessary type 1079 | # information. 1080 | # Note: The availability of this option depends on whether or not doxygen was 1081 | # generated with the -Duse-libclang=ON option for CMake. 1082 | # The default value is: NO. 1083 | 1084 | CLANG_ASSISTED_PARSING = NO 1085 | 1086 | # If clang assisted parsing is enabled you can provide the compiler with command 1087 | # line options that you would normally use when invoking the compiler. Note that 1088 | # the include paths will already be set by doxygen for the files and directories 1089 | # specified with INPUT and INCLUDE_PATH. 1090 | # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. 1091 | 1092 | CLANG_OPTIONS = 1093 | 1094 | #--------------------------------------------------------------------------- 1095 | # Configuration options related to the alphabetical class index 1096 | #--------------------------------------------------------------------------- 1097 | 1098 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all 1099 | # compounds will be generated. Enable this if the project contains a lot of 1100 | # classes, structs, unions or interfaces. 1101 | # The default value is: YES. 1102 | 1103 | ALPHABETICAL_INDEX = YES 1104 | 1105 | # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in 1106 | # which the alphabetical index list will be split. 1107 | # Minimum value: 1, maximum value: 20, default value: 5. 1108 | # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. 1109 | 1110 | COLS_IN_ALPHA_INDEX = 5 1111 | 1112 | # In case all classes in a project start with a common prefix, all classes will 1113 | # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag 1114 | # can be used to specify a prefix (or a list of prefixes) that should be ignored 1115 | # while generating the index headers. 1116 | # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. 1117 | 1118 | IGNORE_PREFIX = 1119 | 1120 | #--------------------------------------------------------------------------- 1121 | # Configuration options related to the HTML output 1122 | #--------------------------------------------------------------------------- 1123 | 1124 | # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output 1125 | # The default value is: YES. 1126 | 1127 | GENERATE_HTML = YES 1128 | 1129 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a 1130 | # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of 1131 | # it. 1132 | # The default directory is: html. 1133 | # This tag requires that the tag GENERATE_HTML is set to YES. 1134 | 1135 | HTML_OUTPUT = html 1136 | 1137 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each 1138 | # generated HTML page (for example: .htm, .php, .asp). 1139 | # The default value is: .html. 1140 | # This tag requires that the tag GENERATE_HTML is set to YES. 1141 | 1142 | HTML_FILE_EXTENSION = .html 1143 | 1144 | # The HTML_HEADER tag can be used to specify a user-defined HTML header file for 1145 | # each generated HTML page. If the tag is left blank doxygen will generate a 1146 | # standard header. 1147 | # 1148 | # To get valid HTML the header file that includes any scripts and style sheets 1149 | # that doxygen needs, which is dependent on the configuration options used (e.g. 1150 | # the setting GENERATE_TREEVIEW). It is highly recommended to start with a 1151 | # default header using 1152 | # doxygen -w html new_header.html new_footer.html new_stylesheet.css 1153 | # YourConfigFile 1154 | # and then modify the file new_header.html. See also section "Doxygen usage" 1155 | # for information on how to generate the default header that doxygen normally 1156 | # uses. 1157 | # Note: The header is subject to change so you typically have to regenerate the 1158 | # default header when upgrading to a newer version of doxygen. For a description 1159 | # of the possible markers and block names see the documentation. 1160 | # This tag requires that the tag GENERATE_HTML is set to YES. 1161 | 1162 | HTML_HEADER = 1163 | 1164 | # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each 1165 | # generated HTML page. If the tag is left blank doxygen will generate a standard 1166 | # footer. See HTML_HEADER for more information on how to generate a default 1167 | # footer and what special commands can be used inside the footer. See also 1168 | # section "Doxygen usage" for information on how to generate the default footer 1169 | # that doxygen normally uses. 1170 | # This tag requires that the tag GENERATE_HTML is set to YES. 1171 | 1172 | HTML_FOOTER = 1173 | 1174 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style 1175 | # sheet that is used by each HTML page. It can be used to fine-tune the look of 1176 | # the HTML output. If left blank doxygen will generate a default style sheet. 1177 | # See also section "Doxygen usage" for information on how to generate the style 1178 | # sheet that doxygen normally uses. 1179 | # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as 1180 | # it is more robust and this tag (HTML_STYLESHEET) will in the future become 1181 | # obsolete. 1182 | # This tag requires that the tag GENERATE_HTML is set to YES. 1183 | 1184 | HTML_STYLESHEET = 1185 | 1186 | # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined 1187 | # cascading style sheets that are included after the standard style sheets 1188 | # created by doxygen. Using this option one can overrule certain style aspects. 1189 | # This is preferred over using HTML_STYLESHEET since it does not replace the 1190 | # standard style sheet and is therefore more robust against future updates. 1191 | # Doxygen will copy the style sheet files to the output directory. 1192 | # Note: The order of the extra style sheet files is of importance (e.g. the last 1193 | # style sheet in the list overrules the setting of the previous ones in the 1194 | # list). For an example see the documentation. 1195 | # This tag requires that the tag GENERATE_HTML is set to YES. 1196 | 1197 | HTML_EXTRA_STYLESHEET = 1198 | 1199 | # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 1200 | # other source files which should be copied to the HTML output directory. Note 1201 | # that these files will be copied to the base HTML output directory. Use the 1202 | # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 1203 | # files. In the HTML_STYLESHEET file, use the file name only. Also note that the 1204 | # files will be copied as-is; there are no commands or markers available. 1205 | # This tag requires that the tag GENERATE_HTML is set to YES. 1206 | 1207 | HTML_EXTRA_FILES = 1208 | 1209 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen 1210 | # will adjust the colors in the style sheet and background images according to 1211 | # this color. Hue is specified as an angle on a colorwheel, see 1212 | # http://en.wikipedia.org/wiki/Hue for more information. For instance the value 1213 | # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 1214 | # purple, and 360 is red again. 1215 | # Minimum value: 0, maximum value: 359, default value: 220. 1216 | # This tag requires that the tag GENERATE_HTML is set to YES. 1217 | 1218 | HTML_COLORSTYLE_HUE = 220 1219 | 1220 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors 1221 | # in the HTML output. For a value of 0 the output will use grayscales only. A 1222 | # value of 255 will produce the most vivid colors. 1223 | # Minimum value: 0, maximum value: 255, default value: 100. 1224 | # This tag requires that the tag GENERATE_HTML is set to YES. 1225 | 1226 | HTML_COLORSTYLE_SAT = 100 1227 | 1228 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the 1229 | # luminance component of the colors in the HTML output. Values below 100 1230 | # gradually make the output lighter, whereas values above 100 make the output 1231 | # darker. The value divided by 100 is the actual gamma applied, so 80 represents 1232 | # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not 1233 | # change the gamma. 1234 | # Minimum value: 40, maximum value: 240, default value: 80. 1235 | # This tag requires that the tag GENERATE_HTML is set to YES. 1236 | 1237 | HTML_COLORSTYLE_GAMMA = 80 1238 | 1239 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 1240 | # page will contain the date and time when the page was generated. Setting this 1241 | # to YES can help to show when doxygen was last run and thus if the 1242 | # documentation is up to date. 1243 | # The default value is: NO. 1244 | # This tag requires that the tag GENERATE_HTML is set to YES. 1245 | 1246 | HTML_TIMESTAMP = NO 1247 | 1248 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 1249 | # documentation will contain sections that can be hidden and shown after the 1250 | # page has loaded. 1251 | # The default value is: NO. 1252 | # This tag requires that the tag GENERATE_HTML is set to YES. 1253 | 1254 | HTML_DYNAMIC_SECTIONS = NO 1255 | 1256 | # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries 1257 | # shown in the various tree structured indices initially; the user can expand 1258 | # and collapse entries dynamically later on. Doxygen will expand the tree to 1259 | # such a level that at most the specified number of entries are visible (unless 1260 | # a fully collapsed tree already exceeds this amount). So setting the number of 1261 | # entries 1 will produce a full collapsed tree by default. 0 is a special value 1262 | # representing an infinite number of entries and will result in a full expanded 1263 | # tree by default. 1264 | # Minimum value: 0, maximum value: 9999, default value: 100. 1265 | # This tag requires that the tag GENERATE_HTML is set to YES. 1266 | 1267 | HTML_INDEX_NUM_ENTRIES = 100 1268 | 1269 | # If the GENERATE_DOCSET tag is set to YES, additional index files will be 1270 | # generated that can be used as input for Apple's Xcode 3 integrated development 1271 | # environment (see: http://developer.apple.com/tools/xcode/), introduced with 1272 | # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a 1273 | # Makefile in the HTML output directory. Running make will produce the docset in 1274 | # that directory and running make install will install the docset in 1275 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at 1276 | # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 1277 | # for more information. 1278 | # The default value is: NO. 1279 | # This tag requires that the tag GENERATE_HTML is set to YES. 1280 | 1281 | GENERATE_DOCSET = NO 1282 | 1283 | # This tag determines the name of the docset feed. A documentation feed provides 1284 | # an umbrella under which multiple documentation sets from a single provider 1285 | # (such as a company or product suite) can be grouped. 1286 | # The default value is: Doxygen generated docs. 1287 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1288 | 1289 | DOCSET_FEEDNAME = "Doxygen generated docs" 1290 | 1291 | # This tag specifies a string that should uniquely identify the documentation 1292 | # set bundle. This should be a reverse domain-name style string, e.g. 1293 | # com.mycompany.MyDocSet. Doxygen will append .docset to the name. 1294 | # The default value is: org.doxygen.Project. 1295 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1296 | 1297 | DOCSET_BUNDLE_ID = org.doxygen.Project 1298 | 1299 | # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify 1300 | # the documentation publisher. This should be a reverse domain-name style 1301 | # string, e.g. com.mycompany.MyDocSet.documentation. 1302 | # The default value is: org.doxygen.Publisher. 1303 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1304 | 1305 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher 1306 | 1307 | # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. 1308 | # The default value is: Publisher. 1309 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1310 | 1311 | DOCSET_PUBLISHER_NAME = Publisher 1312 | 1313 | # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three 1314 | # additional HTML index files: index.hhp, index.hhc, and index.hhk. The 1315 | # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop 1316 | # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on 1317 | # Windows. 1318 | # 1319 | # The HTML Help Workshop contains a compiler that can convert all HTML output 1320 | # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML 1321 | # files are now used as the Windows 98 help format, and will replace the old 1322 | # Windows help format (.hlp) on all Windows platforms in the future. Compressed 1323 | # HTML files also contain an index, a table of contents, and you can search for 1324 | # words in the documentation. The HTML workshop also contains a viewer for 1325 | # compressed HTML files. 1326 | # The default value is: NO. 1327 | # This tag requires that the tag GENERATE_HTML is set to YES. 1328 | 1329 | GENERATE_HTMLHELP = NO 1330 | 1331 | # The CHM_FILE tag can be used to specify the file name of the resulting .chm 1332 | # file. You can add a path in front of the file if the result should not be 1333 | # written to the html output directory. 1334 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1335 | 1336 | CHM_FILE = 1337 | 1338 | # The HHC_LOCATION tag can be used to specify the location (absolute path 1339 | # including file name) of the HTML help compiler (hhc.exe). If non-empty, 1340 | # doxygen will try to run the HTML help compiler on the generated index.hhp. 1341 | # The file has to be specified with full path. 1342 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1343 | 1344 | HHC_LOCATION = 1345 | 1346 | # The GENERATE_CHI flag controls if a separate .chi index file is generated 1347 | # (YES) or that it should be included in the master .chm file (NO). 1348 | # The default value is: NO. 1349 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1350 | 1351 | GENERATE_CHI = NO 1352 | 1353 | # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) 1354 | # and project file content. 1355 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1356 | 1357 | CHM_INDEX_ENCODING = 1358 | 1359 | # The BINARY_TOC flag controls whether a binary table of contents is generated 1360 | # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it 1361 | # enables the Previous and Next buttons. 1362 | # The default value is: NO. 1363 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1364 | 1365 | BINARY_TOC = NO 1366 | 1367 | # The TOC_EXPAND flag can be set to YES to add extra items for group members to 1368 | # the table of contents of the HTML help documentation and to the tree view. 1369 | # The default value is: NO. 1370 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1371 | 1372 | TOC_EXPAND = NO 1373 | 1374 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 1375 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that 1376 | # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help 1377 | # (.qch) of the generated HTML documentation. 1378 | # The default value is: NO. 1379 | # This tag requires that the tag GENERATE_HTML is set to YES. 1380 | 1381 | GENERATE_QHP = NO 1382 | 1383 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify 1384 | # the file name of the resulting .qch file. The path specified is relative to 1385 | # the HTML output folder. 1386 | # This tag requires that the tag GENERATE_QHP is set to YES. 1387 | 1388 | QCH_FILE = 1389 | 1390 | # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help 1391 | # Project output. For more information please see Qt Help Project / Namespace 1392 | # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). 1393 | # The default value is: org.doxygen.Project. 1394 | # This tag requires that the tag GENERATE_QHP is set to YES. 1395 | 1396 | QHP_NAMESPACE = org.doxygen.Project 1397 | 1398 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt 1399 | # Help Project output. For more information please see Qt Help Project / Virtual 1400 | # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- 1401 | # folders). 1402 | # The default value is: doc. 1403 | # This tag requires that the tag GENERATE_QHP is set to YES. 1404 | 1405 | QHP_VIRTUAL_FOLDER = doc 1406 | 1407 | # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom 1408 | # filter to add. For more information please see Qt Help Project / Custom 1409 | # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- 1410 | # filters). 1411 | # This tag requires that the tag GENERATE_QHP is set to YES. 1412 | 1413 | QHP_CUST_FILTER_NAME = 1414 | 1415 | # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the 1416 | # custom filter to add. For more information please see Qt Help Project / Custom 1417 | # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- 1418 | # filters). 1419 | # This tag requires that the tag GENERATE_QHP is set to YES. 1420 | 1421 | QHP_CUST_FILTER_ATTRS = 1422 | 1423 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 1424 | # project's filter section matches. Qt Help Project / Filter Attributes (see: 1425 | # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). 1426 | # This tag requires that the tag GENERATE_QHP is set to YES. 1427 | 1428 | QHP_SECT_FILTER_ATTRS = 1429 | 1430 | # The QHG_LOCATION tag can be used to specify the location of Qt's 1431 | # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the 1432 | # generated .qhp file. 1433 | # This tag requires that the tag GENERATE_QHP is set to YES. 1434 | 1435 | QHG_LOCATION = 1436 | 1437 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be 1438 | # generated, together with the HTML files, they form an Eclipse help plugin. To 1439 | # install this plugin and make it available under the help contents menu in 1440 | # Eclipse, the contents of the directory containing the HTML and XML files needs 1441 | # to be copied into the plugins directory of eclipse. The name of the directory 1442 | # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. 1443 | # After copying Eclipse needs to be restarted before the help appears. 1444 | # The default value is: NO. 1445 | # This tag requires that the tag GENERATE_HTML is set to YES. 1446 | 1447 | GENERATE_ECLIPSEHELP = NO 1448 | 1449 | # A unique identifier for the Eclipse help plugin. When installing the plugin 1450 | # the directory name containing the HTML and XML files should also have this 1451 | # name. Each documentation set should have its own identifier. 1452 | # The default value is: org.doxygen.Project. 1453 | # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. 1454 | 1455 | ECLIPSE_DOC_ID = org.doxygen.Project 1456 | 1457 | # If you want full control over the layout of the generated HTML pages it might 1458 | # be necessary to disable the index and replace it with your own. The 1459 | # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top 1460 | # of each HTML page. A value of NO enables the index and the value YES disables 1461 | # it. Since the tabs in the index contain the same information as the navigation 1462 | # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. 1463 | # The default value is: NO. 1464 | # This tag requires that the tag GENERATE_HTML is set to YES. 1465 | 1466 | DISABLE_INDEX = NO 1467 | 1468 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 1469 | # structure should be generated to display hierarchical information. If the tag 1470 | # value is set to YES, a side panel will be generated containing a tree-like 1471 | # index structure (just like the one that is generated for HTML Help). For this 1472 | # to work a browser that supports JavaScript, DHTML, CSS and frames is required 1473 | # (i.e. any modern browser). Windows users are probably better off using the 1474 | # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can 1475 | # further fine-tune the look of the index. As an example, the default style 1476 | # sheet generated by doxygen has an example that shows how to put an image at 1477 | # the root of the tree instead of the PROJECT_NAME. Since the tree basically has 1478 | # the same information as the tab index, you could consider setting 1479 | # DISABLE_INDEX to YES when enabling this option. 1480 | # The default value is: NO. 1481 | # This tag requires that the tag GENERATE_HTML is set to YES. 1482 | 1483 | GENERATE_TREEVIEW = NO 1484 | 1485 | # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that 1486 | # doxygen will group on one line in the generated HTML documentation. 1487 | # 1488 | # Note that a value of 0 will completely suppress the enum values from appearing 1489 | # in the overview section. 1490 | # Minimum value: 0, maximum value: 20, default value: 4. 1491 | # This tag requires that the tag GENERATE_HTML is set to YES. 1492 | 1493 | ENUM_VALUES_PER_LINE = 4 1494 | 1495 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used 1496 | # to set the initial width (in pixels) of the frame in which the tree is shown. 1497 | # Minimum value: 0, maximum value: 1500, default value: 250. 1498 | # This tag requires that the tag GENERATE_HTML is set to YES. 1499 | 1500 | TREEVIEW_WIDTH = 250 1501 | 1502 | # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to 1503 | # external symbols imported via tag files in a separate window. 1504 | # The default value is: NO. 1505 | # This tag requires that the tag GENERATE_HTML is set to YES. 1506 | 1507 | EXT_LINKS_IN_WINDOW = NO 1508 | 1509 | # Use this tag to change the font size of LaTeX formulas included as images in 1510 | # the HTML documentation. When you change the font size after a successful 1511 | # doxygen run you need to manually remove any form_*.png images from the HTML 1512 | # output directory to force them to be regenerated. 1513 | # Minimum value: 8, maximum value: 50, default value: 10. 1514 | # This tag requires that the tag GENERATE_HTML is set to YES. 1515 | 1516 | FORMULA_FONTSIZE = 10 1517 | 1518 | # Use the FORMULA_TRANPARENT tag to determine whether or not the images 1519 | # generated for formulas are transparent PNGs. Transparent PNGs are not 1520 | # supported properly for IE 6.0, but are supported on all modern browsers. 1521 | # 1522 | # Note that when changing this option you need to delete any form_*.png files in 1523 | # the HTML output directory before the changes have effect. 1524 | # The default value is: YES. 1525 | # This tag requires that the tag GENERATE_HTML is set to YES. 1526 | 1527 | FORMULA_TRANSPARENT = YES 1528 | 1529 | # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see 1530 | # http://www.mathjax.org) which uses client side Javascript for the rendering 1531 | # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX 1532 | # installed or if you want to formulas look prettier in the HTML output. When 1533 | # enabled you may also need to install MathJax separately and configure the path 1534 | # to it using the MATHJAX_RELPATH option. 1535 | # The default value is: NO. 1536 | # This tag requires that the tag GENERATE_HTML is set to YES. 1537 | 1538 | USE_MATHJAX = NO 1539 | 1540 | # When MathJax is enabled you can set the default output format to be used for 1541 | # the MathJax output. See the MathJax site (see: 1542 | # http://docs.mathjax.org/en/latest/output.html) for more details. 1543 | # Possible values are: HTML-CSS (which is slower, but has the best 1544 | # compatibility), NativeMML (i.e. MathML) and SVG. 1545 | # The default value is: HTML-CSS. 1546 | # This tag requires that the tag USE_MATHJAX is set to YES. 1547 | 1548 | MATHJAX_FORMAT = HTML-CSS 1549 | 1550 | # When MathJax is enabled you need to specify the location relative to the HTML 1551 | # output directory using the MATHJAX_RELPATH option. The destination directory 1552 | # should contain the MathJax.js script. For instance, if the mathjax directory 1553 | # is located at the same level as the HTML output directory, then 1554 | # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax 1555 | # Content Delivery Network so you can quickly see the result without installing 1556 | # MathJax. However, it is strongly recommended to install a local copy of 1557 | # MathJax from http://www.mathjax.org before deployment. 1558 | # The default value is: http://cdn.mathjax.org/mathjax/latest. 1559 | # This tag requires that the tag USE_MATHJAX is set to YES. 1560 | 1561 | MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest 1562 | 1563 | # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax 1564 | # extension names that should be enabled during MathJax rendering. For example 1565 | # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols 1566 | # This tag requires that the tag USE_MATHJAX is set to YES. 1567 | 1568 | MATHJAX_EXTENSIONS = 1569 | 1570 | # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces 1571 | # of code that will be used on startup of the MathJax code. See the MathJax site 1572 | # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an 1573 | # example see the documentation. 1574 | # This tag requires that the tag USE_MATHJAX is set to YES. 1575 | 1576 | MATHJAX_CODEFILE = 1577 | 1578 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box for 1579 | # the HTML output. The underlying search engine uses javascript and DHTML and 1580 | # should work on any modern browser. Note that when using HTML help 1581 | # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) 1582 | # there is already a search function so this one should typically be disabled. 1583 | # For large projects the javascript based search engine can be slow, then 1584 | # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to 1585 | # search using the keyboard; to jump to the search box use + S 1586 | # (what the is depends on the OS and browser, but it is typically 1587 | # , /