From 4854dcf0eb28860aaa94edbc5933c1cd0f23a7d2 Mon Sep 17 00:00:00 2001 From: Jeroen Domburg Date: Mon, 19 Dec 2016 16:39:55 +0800 Subject: [PATCH] Get rid of old interrupt example code --- components/driver/include/driver/gpio.h | 9 +-------- components/driver/include/driver/uart.h | 5 +---- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/components/driver/include/driver/gpio.h b/components/driver/include/driver/gpio.h index fba013fe8b..83d3806834 100644 --- a/components/driver/include/driver/gpio.h +++ b/components/driver/include/driver/gpio.h @@ -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-------------------* diff --git a/components/driver/include/driver/uart.h b/components/driver/include/driver/uart.h index 34ca9fc401..e956308522 100644 --- a/components/driver/include/driver/uart.h +++ b/components/driver/include/driver/uart.h @@ -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 -- 2.40.0