]> granicus.if.org Git - esp-idf/commitdiff
Get rid of old interrupt example code
authorJeroen Domburg <jeroen@espressif.com>
Mon, 19 Dec 2016 08:39:55 +0000 (16:39 +0800)
committerJeroen Domburg <jeroen@espressif.com>
Mon, 19 Dec 2016 10:48:08 +0000 (18:48 +0800)
components/driver/include/driver/gpio.h
components/driver/include/driver/uart.h

index fba013fe8b9af6cf1de9fa6d6c84155cc213c8ad..83d38068342335843cb7fa867ec34181dd8d08c2 100644 (file)
@@ -343,9 +343,6 @@ esp_err_t gpio_wakeup_disable(gpio_num_t gpio_num);
 /**
  * @brief   register GPIO interrupt handler, the handler is an ISR.
  *          The handler will be attached to the same CPU core that this function is running on.
- *          @note
- *          Users should know that which CPU is running and then pick a INUM that is not used by system.
- *          We can find the information of INUM and interrupt level in soc.h.
  *
  * @param  fn  Interrupt handler function.
  * @param  intr_alloc_flags Flags used to allocate the interrupt. One or multiple (ORred)
@@ -444,12 +441,8 @@ esp_err_t gpio_pulldown_dis(gpio_num_t gpio_num);
 /**
  *----------EXAMPLE TO SET ISR HANDLER ----------------------
  * @code{c}
- * gpio_isr_register(gpio_intr_test,NULL, 0);    //hook the isr handler for GPIO interrupt
+ * gpio_isr_register(gpio_intr_test, 0, NULL);    //hook the isr handler for GPIO interrupt
  * @endcode
- * @note
- *     1. user should arrange the INUMs that used, better not to use a same INUM for different interrupt.
- *     2. do not pick the INUM that already occupied by the system.
- *     3. refer to soc.h to check which INUMs that can be used.
  */
 /**
  *-------------EXAMPLE OF HANDLER FUNCTION-------------------*
index 34ca9fc4018d67c0a426ff4b113d0f860cca256b..e9563085225b6c356d26155e49d42be2f0d437a8 100644 (file)
@@ -463,8 +463,6 @@ esp_err_t uart_intr_config(uart_port_t uart_num, const uart_intr_config_t *intr_
  * @brief Install UART driver.
  *
  * UART ISR handler will be attached to the same CPU core that this function is running on.
- * Users should know that which CPU is running and then pick a INUM that is not used by system.
- * We can find the information of INUM and interrupt level in soc.h.
  *
  * @param uart_num UART_NUM_0, UART_NUM_1 or UART_NUM_2
  * @param rx_buffer_size UART RX ring buffer size
@@ -595,7 +593,6 @@ esp_err_t uart_flush(uart_port_t uart_num);
  * @code{c}
  * //1. Setup UART
  * #include "freertos/queue.h"
- * #define UART_INTR_NUM 17                                //choose one interrupt number from soc.h
  * //a. Set UART parameter
  * int uart_num = 0;                                       //uart port number
  * uart_config_t uart_config = {
@@ -658,7 +655,7 @@ esp_err_t uart_flush(uart_port_t uart_num);
  *     //Set UART1 pins(TX: IO16, RX: IO17, RTS: IO18, CTS: IO19)
  *     uart_set_pin(uart_num, 16, 17, 18, 19);
  *     //Install UART driver( We don't need an event queue here)
- *     uart_driver_install(uart_num, 1024 * 2, 1024*4, 10, 17, NULL, RINGBUF_TYPE_BYTEBUF);
+ *     uart_driver_install(uart_num, 1024 * 2, 1024*4, 10, NULL, 0);
  *     uint8_t data[1000];
  *     while(1) {
  *         //Read data from UART