From 3eaf1ec907ff407a098586bca80270b9dd938b02 Mon Sep 17 00:00:00 2001 From: Krzysztof Date: Sat, 5 Nov 2016 17:18:25 +0100 Subject: [PATCH] All API Reference docs updated to match header files 1. Wi-Fi 2. Bluetooth 2. GPIO 4. LED Control 5. Logging 6. Non-Volatile Storage 7. Virtual Filesystem --- docs/Doxyfile | 2 +- docs/api/bt.rst | 16 +++-- docs/api/esp_wifi.rst | 33 +++++---- docs/api/gpio.rst | 159 ++++++++++++++++++++++++++--------------- docs/api/ledc.rst | 61 ++++++++++++++++ docs/api/log.rst | 35 +++++++++ docs/api/nvs_flash.rst | 67 +++++++++++++++++ docs/api/vfs.rst | 30 +++++--- 8 files changed, 312 insertions(+), 91 deletions(-) create mode 100644 docs/api/ledc.rst create mode 100644 docs/api/nvs_flash.rst diff --git a/docs/Doxyfile b/docs/Doxyfile index 9c53aff1f..6ff4c4586 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -1,6 +1,6 @@ PROJECT_NAME = "ESP32 Programming Guide" -INPUT = ../components/esp32/include/esp_wifi.h ../components/driver/include/driver ../components/esp32/include/rom/gpio.h ../components/bt/include ../components/nvs_flash/include ../components/log/include ../components/vfs/include +INPUT = ../components/esp32/include/esp_wifi.h ../components/driver/include/driver ../components/bt/include ../components/nvs_flash/include ../components/log/include ../components/vfs/include WARN_NO_PARAMDOC = YES diff --git a/docs/api/bt.rst b/docs/api/bt.rst index 72ab9fbd1..7cbbb9158 100644 --- a/docs/api/bt.rst +++ b/docs/api/bt.rst @@ -1,20 +1,22 @@ -Bluetooth API -============= +Bluetooth +========= Overview -------- -`Instructions `_ +`Instructions`_ Application Example ------------------- -`Instructions `_ +`Instructions`_ -Reference ---------- +API Reference +------------- -`Instructions `_ +`Instructions`_ + +.. _Instructions: template.html Type Definitions ^^^^^^^^^^^^^^^^ diff --git a/docs/api/esp_wifi.rst b/docs/api/esp_wifi.rst index e4ec59fc8..e417e18ca 100644 --- a/docs/api/esp_wifi.rst +++ b/docs/api/esp_wifi.rst @@ -1,20 +1,22 @@ -Wi-Fi API -========= +Wi-Fi +===== Overview -------- -`Instructions `_ +`Instructions`_ Application Example ------------------- -`Instructions `_ +`Instructions`_ -Reference ---------- +API Reference +------------- -`Instructions `_ +`Instructions`_ + +.. _Instructions: template.html Macros ------ @@ -22,14 +24,13 @@ Macros .. doxygendefine:: WIFI_INIT_CONFIG_DEFAULT -Typedefs --------- +Type Definitions +---------------- .. doxygentypedef:: wifi_promiscuous_cb_t .. doxygentypedef:: wifi_rxcb_t .. doxygentypedef:: esp_vendor_ie_cb_t - Functions --------- @@ -42,11 +43,12 @@ Functions .. doxygenfunction:: esp_wifi_connect .. doxygenfunction:: esp_wifi_disconnect .. doxygenfunction:: esp_wifi_clear_fast_connect -.. doxygenfunction:: esp_wifi_kick_station +.. doxygenfunction:: esp_wifi_deauth_sta .. doxygenfunction:: esp_wifi_scan_start .. doxygenfunction:: esp_wifi_scan_stop -.. doxygenfunction:: esp_wifi_get_ap_num -.. doxygenfunction:: esp_wifi_get_ap_list +.. doxygenfunction:: esp_wifi_scan_get_ap_num +.. doxygenfunction:: esp_wifi_scan_get_ap_records +.. doxygenfunction:: esp_wifi_sta_get_ap_info .. doxygenfunction:: esp_wifi_set_ps .. doxygenfunction:: esp_wifi_get_ps .. doxygenfunction:: esp_wifi_set_protocol @@ -64,11 +66,12 @@ Functions .. doxygenfunction:: esp_wifi_get_promiscuous .. doxygenfunction:: esp_wifi_set_config .. doxygenfunction:: esp_wifi_get_config -.. doxygenfunction:: esp_wifi_get_station_list -.. doxygenfunction:: esp_wifi_free_station_list +.. doxygenfunction:: esp_wifi_ap_get_sta_list .. doxygenfunction:: esp_wifi_set_storage .. doxygenfunction:: esp_wifi_reg_rxcb .. doxygenfunction:: esp_wifi_set_auto_connect .. doxygenfunction:: esp_wifi_get_auto_connect .. doxygenfunction:: esp_wifi_set_vendor_ie .. doxygenfunction:: esp_wifi_set_vendor_ie_cb + + diff --git a/docs/api/gpio.rst b/docs/api/gpio.rst index 3c5c12292..72ba3e82f 100644 --- a/docs/api/gpio.rst +++ b/docs/api/gpio.rst @@ -1,26 +1,120 @@ -GPIO API -======== +GPIO +==== Overview -------- -`Instructions `_ +`Instructions`_ Application Example ------------------- -`Instructions `_ +`Instructions`_ -Reference ---------- +API Reference +------------- -`Instructions `_ +`Instructions`_ + +.. _Instructions: template.html + +Macros +------ + +.. doxygendefine:: GPIO_SEL_0 +.. doxygendefine:: GPIO_SEL_1 +.. doxygendefine:: GPIO_SEL_2 +.. doxygendefine:: GPIO_SEL_3 +.. doxygendefine:: GPIO_SEL_4 +.. doxygendefine:: GPIO_SEL_5 +.. doxygendefine:: GPIO_SEL_6 +.. doxygendefine:: GPIO_SEL_7 +.. doxygendefine:: GPIO_SEL_8 +.. doxygendefine:: GPIO_SEL_9 +.. doxygendefine:: GPIO_SEL_10 +.. doxygendefine:: GPIO_SEL_11 +.. doxygendefine:: GPIO_SEL_12 +.. doxygendefine:: GPIO_SEL_13 +.. doxygendefine:: GPIO_SEL_14 +.. doxygendefine:: GPIO_SEL_15 +.. doxygendefine:: GPIO_SEL_16 +.. doxygendefine:: GPIO_SEL_17 +.. doxygendefine:: GPIO_SEL_18 +.. doxygendefine:: GPIO_SEL_19 +.. doxygendefine:: GPIO_SEL_21 +.. doxygendefine:: GPIO_SEL_22 +.. doxygendefine:: GPIO_SEL_23 +.. doxygendefine:: GPIO_SEL_25 +.. doxygendefine:: GPIO_SEL_26 +.. doxygendefine:: GPIO_SEL_27 +.. doxygendefine:: GPIO_SEL_32 +.. doxygendefine:: GPIO_SEL_33 +.. doxygendefine:: GPIO_SEL_34 +.. doxygendefine:: GPIO_SEL_35 +.. doxygendefine:: GPIO_SEL_36 +.. doxygendefine:: GPIO_SEL_37 +.. doxygendefine:: GPIO_SEL_38 +.. doxygendefine:: GPIO_SEL_39 +.. doxygendefine:: GPIO_PIN_REG_0 +.. doxygendefine:: GPIO_PIN_REG_1 +.. doxygendefine:: GPIO_PIN_REG_2 +.. doxygendefine:: GPIO_PIN_REG_3 +.. doxygendefine:: GPIO_PIN_REG_4 +.. doxygendefine:: GPIO_PIN_REG_5 +.. doxygendefine:: GPIO_PIN_REG_6 +.. doxygendefine:: GPIO_PIN_REG_7 +.. doxygendefine:: GPIO_PIN_REG_8 +.. doxygendefine:: GPIO_PIN_REG_9 +.. doxygendefine:: GPIO_PIN_REG_10 +.. doxygendefine:: GPIO_PIN_REG_11 +.. doxygendefine:: GPIO_PIN_REG_12 +.. doxygendefine:: GPIO_PIN_REG_13 +.. doxygendefine:: GPIO_PIN_REG_14 +.. doxygendefine:: GPIO_PIN_REG_15 +.. doxygendefine:: GPIO_PIN_REG_16 +.. doxygendefine:: GPIO_PIN_REG_17 +.. doxygendefine:: GPIO_PIN_REG_18 +.. doxygendefine:: GPIO_PIN_REG_19 +.. doxygendefine:: GPIO_PIN_REG_20 +.. doxygendefine:: GPIO_PIN_REG_21 +.. doxygendefine:: GPIO_PIN_REG_22 +.. doxygendefine:: GPIO_PIN_REG_23 +.. doxygendefine:: GPIO_PIN_REG_25 +.. doxygendefine:: GPIO_PIN_REG_26 +.. doxygendefine:: GPIO_PIN_REG_27 +.. doxygendefine:: GPIO_PIN_REG_32 +.. doxygendefine:: GPIO_PIN_REG_33 +.. doxygendefine:: GPIO_PIN_REG_34 +.. doxygendefine:: GPIO_PIN_REG_35 +.. doxygendefine:: GPIO_PIN_REG_36 +.. doxygendefine:: GPIO_PIN_REG_37 +.. doxygendefine:: GPIO_PIN_REG_38 +.. doxygendefine:: GPIO_PIN_REG_39 +.. doxygendefine:: GPIO_APP_CPU_INTR_ENA +.. doxygendefine:: GPIO_APP_CPU_NMI_INTR_ENA +.. doxygendefine:: GPIO_PRO_CPU_INTR_ENA +.. doxygendefine:: GPIO_PRO_CPU_NMI_INTR_ENA +.. doxygendefine:: GPIO_SDIO_EXT_INTR_ENA +.. doxygendefine:: GPIO_MODE_DEF_INPUT +.. doxygendefine:: GPIO_MODE_DEF_OUTPUT +.. doxygendefine:: GPIO_MODE_DEF_OD +.. doxygendefine:: GPIO_PIN_COUNT +.. doxygendefine:: GPIO_IS_VALID_GPIO +.. doxygendefine:: GPIO_IS_VALID_OUTPUT_GPIO + +Type Definitions +^^^^^^^^^^^^^^^^ + +.. doxygentypedef:: gpio_event_callback Enumerations ^^^^^^^^^^^^ +.. doxygenenum:: gpio_num_t .. doxygenenum:: gpio_int_type_t .. doxygenenum:: gpio_mode_t +.. doxygenenum:: gpio_pullup_t +.. doxygenenum:: gpio_pulldown_t .. doxygenenum:: gpio_pull_mode_t Functions @@ -37,54 +131,3 @@ Functions .. doxygenfunction:: gpio_wakeup_enable .. doxygenfunction:: gpio_wakeup_disable .. doxygenfunction:: gpio_isr_register - -*Example code:* Configuration of GPIO as an output - -.. code-block:: c - - gpio_config_t io_conf; - io_conf.intr_type = GPIO_INTR_DISABLE; //disable interrupt - io_conf.mode = GPIO_MODE_OUTPUT; //set as output mode - io_conf.pin_bit_mask = GPIO_SEL_18 | GPIO_SEL_19; //bit mask of the pins that you want to set,e.g.GPIO18/19 - io_conf.pull_down_en = 0; //disable pull-down mode - io_conf.pull_up_en = 0; //disable pull-up mode - gpio_config(&io_conf); //configure GPIO with the given settings - -*Example code:* Configuration of GPIO as an input - -.. code-block:: c - - gpio_config_t io_conf; - io_conf.intr_type = GPIO_INTR_POSEDGE; //set posedge interrupt - io_conf.mode = GPIO_MODE_INPUT; //set as input - io_conf.pin_bit_mask = GPIO_SEL_4 | GPIO_SEL_5; //bit mask of the pins that you want to set, e.g.,GPIO4/5 - io_conf.pull_down_en = 0; //disable pull-down mode - io_conf.pull_up_en = 1; //enable pull-up mode - gpio_config(&io_conf); //configure GPIO with the given settings - - -ROM GPIO functions -^^^^^^^^^^^^^^^^^^ - -.. doxygenfunction:: gpio_init -.. doxygenfunction:: gpio_output_set -.. doxygenfunction:: gpio_output_set_high -.. doxygenfunction:: gpio_input_get -.. doxygenfunction:: gpio_input_get_high -.. doxygenfunction:: gpio_intr_handler_register -.. doxygenfunction:: gpio_intr_pending -.. doxygenfunction:: gpio_intr_pending_high -.. doxygenfunction:: gpio_intr_ack -.. doxygenfunction:: gpio_intr_ack_high -.. doxygenfunction:: gpio_pin_wakeup_enable -.. doxygenfunction:: gpio_pin_wakeup_disable -.. doxygenfunction:: gpio_matrix_in -.. doxygenfunction:: gpio_matrix_out -.. doxygenfunction:: gpio_pad_select_gpio -.. doxygenfunction:: gpio_pad_set_drv -.. doxygenfunction:: gpio_pad_pullup -.. doxygenfunction:: gpio_pad_pulldown -.. doxygenfunction:: gpio_pad_unhold -.. doxygenfunction:: gpio_pad_hold - - diff --git a/docs/api/ledc.rst b/docs/api/ledc.rst new file mode 100644 index 000000000..32b639f3f --- /dev/null +++ b/docs/api/ledc.rst @@ -0,0 +1,61 @@ +LED Control +=========== + +Overview +-------- + +`Instructions`_ + +Application Example +------------------- + +`Instructions`_ + +API Reference +------------- + +`Instructions`_ + +.. _Instructions: template.html + +Data Structures +^^^^^^^^^^^^^^^ + +.. doxygenstruct:: ledc_channel_config_t +.. doxygenstruct:: ledc_timer_config_t + +Macros +^^^^^^ + +.. doxygendefine:: LEDC_APB_CLK_HZ +.. doxygendefine:: LEDC_REF_CLK_HZ + +Enumerations +^^^^^^^^^^^^ + +.. doxygenenum:: ledc_mode_t +.. doxygenenum:: ledc_intr_type_t +.. doxygenenum:: ledc_duty_direction_t +.. doxygenenum:: ledc_clk_src_t +.. doxygenenum:: ledc_timer_t +.. doxygenenum:: ledc_channel_t +.. doxygenenum:: ledc_timer_bit_t + +Functions +^^^^^^^^^ + +.. doxygenfunction:: ledc_channel_config +.. doxygenfunction:: ledc_timer_config +.. doxygenfunction:: ledc_update_duty +.. doxygenfunction:: ledc_stop +.. doxygenfunction:: ledc_set_freq +.. doxygenfunction:: ledc_get_freq +.. doxygenfunction:: ledc_set_duty +.. doxygenfunction:: ledc_get_duty +.. doxygenfunction:: ledc_set_fade +.. doxygenfunction:: ledc_isr_register +.. doxygenfunction:: ledc_timer_set +.. doxygenfunction:: ledc_timer_rst +.. doxygenfunction:: ledc_timer_pause +.. doxygenfunction:: ledc_timer_resume +.. doxygenfunction:: ledc_bind_channel_timer diff --git a/docs/api/log.rst b/docs/api/log.rst index dc76a3047..49f97108a 100644 --- a/docs/api/log.rst +++ b/docs/api/log.rst @@ -3,6 +3,33 @@ API Reference ------------- +Macros +^^^^^^ + +.. doxygendefine:: LOG_COLOR_E +.. doxygendefine:: LOG_COLOR_W +.. doxygendefine:: LOG_COLOR_I +.. doxygendefine:: LOG_COLOR_D +.. doxygendefine:: LOG_COLOR_V +.. doxygendefine:: LOG_RESET_COLOR +.. doxygendefine:: LOG_FORMAT +.. doxygendefine:: LOG_LOCAL_LEVEL +.. doxygendefine:: ESP_EARLY_LOGE +.. doxygendefine:: ESP_EARLY_LOGW +.. doxygendefine:: ESP_EARLY_LOGI +.. doxygendefine:: ESP_EARLY_LOGD +.. doxygendefine:: ESP_EARLY_LOGV +.. doxygendefine:: ESP_LOGE +.. doxygendefine:: ESP_LOGW +.. doxygendefine:: ESP_LOGI +.. doxygendefine:: ESP_LOGD +.. doxygendefine:: ESP_LOGV + +Type Definitions +^^^^^^^^^^^^^^^^ + +.. doxygentypedef:: vprintf_like_t + Enumerations ^^^^^^^^^^^^ @@ -17,3 +44,11 @@ Functions .. doxygenfunction:: esp_log_write + + + + + + + + diff --git a/docs/api/nvs_flash.rst b/docs/api/nvs_flash.rst new file mode 100644 index 000000000..16c74fa53 --- /dev/null +++ b/docs/api/nvs_flash.rst @@ -0,0 +1,67 @@ +.. include:: ../../components/nvs_flash/README.rst + +Application Example +------------------- + +`Instructions `_ + +API Reference +------------- + +Macros +^^^^^^ + +.. doxygendefine:: ESP_ERR_NVS_BASE +.. doxygendefine:: ESP_ERR_NVS_NOT_INITIALIZED +.. doxygendefine:: ESP_ERR_NVS_NOT_FOUND +.. doxygendefine:: ESP_ERR_NVS_TYPE_MISMATCH +.. doxygendefine:: ESP_ERR_NVS_READ_ONLY +.. doxygendefine:: ESP_ERR_NVS_NOT_ENOUGH_SPACE +.. doxygendefine:: ESP_ERR_NVS_INVALID_NAME +.. doxygendefine:: ESP_ERR_NVS_INVALID_HANDLE +.. doxygendefine:: ESP_ERR_NVS_REMOVE_FAILED +.. doxygendefine:: ESP_ERR_NVS_KEY_TOO_LONG +.. doxygendefine:: ESP_ERR_NVS_PAGE_FULL +.. doxygendefine:: ESP_ERR_NVS_INVALID_STATE +.. doxygendefine:: ESP_ERR_NVS_INVALID_LENGTH + +Type Definitions +^^^^^^^^^^^^^^^^ + +.. doxygentypedef:: nvs_handle + +Enumerations +^^^^^^^^^^^^ + +.. doxygenenum:: nvs_open_mode + +Functions +^^^^^^^^^ +.. doxygenfunction:: nvs_open +.. doxygenfunction:: nvs_set_i8 +.. doxygenfunction:: nvs_set_u8 +.. doxygenfunction:: nvs_set_i16 +.. doxygenfunction:: nvs_set_u16 +.. doxygenfunction:: nvs_set_i32 +.. doxygenfunction:: nvs_set_u32 +.. doxygenfunction:: nvs_set_i64 +.. doxygenfunction:: nvs_set_u64 +.. doxygenfunction:: nvs_set_str +.. doxygenfunction:: nvs_set_blob +.. doxygenfunction:: nvs_get_i8 +.. doxygenfunction:: nvs_get_u8 +.. doxygenfunction:: nvs_get_i16 +.. doxygenfunction:: nvs_get_u16 +.. doxygenfunction:: nvs_get_i32 +.. doxygenfunction:: nvs_get_u32 +.. doxygenfunction:: nvs_get_i64 +.. doxygenfunction:: nvs_get_u64 +.. doxygenfunction:: nvs_get_str +.. doxygenfunction:: nvs_get_blob +.. doxygenfunction:: nvs_erase_key +.. doxygenfunction:: nvs_erase_all +.. doxygenfunction:: nvs_commit +.. doxygenfunction:: nvs_close +.. doxygenfunction:: nvs_flash_init +.. doxygenfunction:: nvs_flash_init_custom + diff --git a/docs/api/vfs.rst b/docs/api/vfs.rst index 97ea1a584..122a8671e 100644 --- a/docs/api/vfs.rst +++ b/docs/api/vfs.rst @@ -1,15 +1,19 @@ .. include:: ../../components/vfs/README.rst +Application Example +------------------- + +`Instructions `_ + API Reference ------------- -Defines -^^^^^^^ +Macros +^^^^^^ -.. doxygendefine:: ESP_VFS_PATH_MAX +.. doxygendefine:: ESP_VFS_PATH_MAX .. doxygendefine:: ESP_VFS_FLAG_DEFAULT -.. doxygendefine:: ESP_VFS_FLAG_CONTEXT_PTR - +.. doxygendefine:: ESP_VFS_FLAG_CONTEXT_PTR Structures ^^^^^^^^^^ @@ -19,9 +23,15 @@ Structures Functions ^^^^^^^^^ -.. doxygenfunction:: esp_vfs_dev_uart_register .. doxygenfunction:: esp_vfs_register - - - - +.. doxygenfunction:: esp_vfs_write +.. doxygenfunction:: esp_vfs_lseek +.. doxygenfunction:: esp_vfs_read +.. doxygenfunction:: esp_vfs_open +.. doxygenfunction:: esp_vfs_close +.. doxygenfunction:: esp_vfs_fstat +.. doxygenfunction:: esp_vfs_stat +.. doxygenfunction:: esp_vfs_link +.. doxygenfunction:: esp_vfs_unlink +.. doxygenfunction:: esp_vfs_rename +.. doxygenfunction:: esp_vfs_dev_uart_register