t

Fork of mbed-dev by mbed official

Committer:
mbed_official
Date:
Tue Apr 05 18:15:12 2016 +0100
Revision:
107:414e9c822e99
Synchronized with git revision dd3c5f7fa8473776950ec6e15c0e4adedb21cf2f

Full URL: https://github.com/mbedmicro/mbed/commit/dd3c5f7fa8473776950ec6e15c0e4adedb21cf2f/

* * Base Commit for SAMG55J19. No errors and no implementations.

* * Added gpio files.

* * Added pinmap files.

* * Base commit for usticker implementation.

* * Added gcc_arm export functionality

* * added files for usticker.
* added template file for samd55j19

* * GPIO IRQ base commit.

* * updated with changes in gpio irq driver.

* * Reverted back unexpected commit in SAM0 gpio driver.

* * updated gpio_irq driver.

* * correction in gpio and gpio_irq drivers.
* added support for some test for gpio.

* * base commit for peripheralpins for usart.
* update in serial apis.

* * updated serial apis.

* * updated serial apis and test.

* * update serial apis for asynch apis.

* * updated peripheral pins for i2c and spi.
* added test support for serial flow control

* * Base commit for low power ticker implementation.

* * base commit for port apis.
* update in lp ticker apis.

* * Added test support for port.

* * base commit for sleep apis.

* * Base commit for spi.

* * updated with corrections in gpio irq.
* usticker file updated with latest source.

* * updated with corrections for unexpected board reset.
* updated gpio irq apis and added test for the same.

* * updated sleep api for deepsleep.

* * updated serial apis.

* Added uc_ticker and SPI api implementations

* Removed unused SPI pin map

* Updated review feedback

* * implemented lpticker with TC module.
* updated files for KnR Coding Statndard.
* updated serial and usticker apis.

* * Base commit for AnalogueIn apis.

* * RTC apis base commit without implementation.

* * Updated with corrections in lpticker implementations.

* * Added implementation for rtc apis.

* * updated with implementations for pwm.
* changed usticker from TC0 to TC1.

* Added I2C support

* * removed setvector usage from usticker and lpticker implementations
* added tests for SAMG55J19

* * Removed unwanted .o and .d files.
* Updated I2C files for KnR Coding Standards.
* Update for reducing compiler warnings in peripheralpins,c
* Updated with PWM free implementation.

* * Removed unwanted headers file inclusion.
* Compiler warning corrections in serial_api.c

* * Updated ADC with 16 bit mode initialization and code refinements.
* Updated PWM with code refinements.

* Updated I2C review feedback and fixed style

* Updated target name for SAMG55

* * Added Test Support for I2C with AT30TSE75X and Added Support for SAMG55J19 in atmelstudio project exporter

* * Added Test Support for I2C with AT30TSE75X and Added Support for SAMG55J19 in atmelstudio project exporter

* Used NVIC_SetVector for interrupt callback

* Removed Target macro define in test

* Updated test cases to have SAMG55 support

* * Updated with corrections in Serial and SPI asynchronous implementations.
* Updated deepsleep api implementation
* Merged LP_Ticker with latest code from mbed 3.0 repository.

* * updated with corrections in I2C Asynch implementation.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 107:414e9c822e99 1 /**
mbed_official 107:414e9c822e99 2 * \file
mbed_official 107:414e9c822e99 3 *
mbed_official 107:414e9c822e99 4 * \brief SAM Peripheral DMA Controller (PDC) driver.
mbed_official 107:414e9c822e99 5 *
mbed_official 107:414e9c822e99 6 * Copyright (c) 2011-2015 Atmel Corporation. All rights reserved.
mbed_official 107:414e9c822e99 7 *
mbed_official 107:414e9c822e99 8 * \asf_license_start
mbed_official 107:414e9c822e99 9 *
mbed_official 107:414e9c822e99 10 * \page License
mbed_official 107:414e9c822e99 11 *
mbed_official 107:414e9c822e99 12 * Redistribution and use in source and binary forms, with or without
mbed_official 107:414e9c822e99 13 * modification, are permitted provided that the following conditions are met:
mbed_official 107:414e9c822e99 14 *
mbed_official 107:414e9c822e99 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 107:414e9c822e99 16 * this list of conditions and the following disclaimer.
mbed_official 107:414e9c822e99 17 *
mbed_official 107:414e9c822e99 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 107:414e9c822e99 19 * this list of conditions and the following disclaimer in the documentation
mbed_official 107:414e9c822e99 20 * and/or other materials provided with the distribution.
mbed_official 107:414e9c822e99 21 *
mbed_official 107:414e9c822e99 22 * 3. The name of Atmel may not be used to endorse or promote products derived
mbed_official 107:414e9c822e99 23 * from this software without specific prior written permission.
mbed_official 107:414e9c822e99 24 *
mbed_official 107:414e9c822e99 25 * 4. This software may only be redistributed and used in connection with an
mbed_official 107:414e9c822e99 26 * Atmel microcontroller product.
mbed_official 107:414e9c822e99 27 *
mbed_official 107:414e9c822e99 28 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
mbed_official 107:414e9c822e99 29 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
mbed_official 107:414e9c822e99 30 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
mbed_official 107:414e9c822e99 31 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
mbed_official 107:414e9c822e99 32 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 107:414e9c822e99 33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
mbed_official 107:414e9c822e99 34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
mbed_official 107:414e9c822e99 35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
mbed_official 107:414e9c822e99 36 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
mbed_official 107:414e9c822e99 37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
mbed_official 107:414e9c822e99 38 * POSSIBILITY OF SUCH DAMAGE.
mbed_official 107:414e9c822e99 39 *
mbed_official 107:414e9c822e99 40 * \asf_license_stop
mbed_official 107:414e9c822e99 41 *
mbed_official 107:414e9c822e99 42 */
mbed_official 107:414e9c822e99 43 /*
mbed_official 107:414e9c822e99 44 * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
mbed_official 107:414e9c822e99 45 */
mbed_official 107:414e9c822e99 46
mbed_official 107:414e9c822e99 47 #ifndef PDC_H_INCLUDED
mbed_official 107:414e9c822e99 48 #define PDC_H_INCLUDED
mbed_official 107:414e9c822e99 49
mbed_official 107:414e9c822e99 50 /**
mbed_official 107:414e9c822e99 51 * \defgroup asfdoc_sam_drivers_pdc_group SAM3A/3N/3S/3U/3X/4E/4N/4S/G Peripheral DMA Controller (PDC) Driver
mbed_official 107:414e9c822e99 52 * This driver for Atmel&reg; | SMART ARM&reg;-based microcontrollers provides
mbed_official 107:414e9c822e99 53 * an interface for the configuration and management of the the Peripheral
mbed_official 107:414e9c822e99 54 * Direct Memory Access (DMA) Controller (PDC) module.
mbed_official 107:414e9c822e99 55 *
mbed_official 107:414e9c822e99 56 * The PDC transfers data between on-chip serial peripherals and the on and/or
mbed_official 107:414e9c822e99 57 * off-chip memories. The link between the PDC and a serial peripheral is
mbed_official 107:414e9c822e99 58 * operated by the AHB to ABP bridge.
mbed_official 107:414e9c822e99 59 *
mbed_official 107:414e9c822e99 60 * This module:
mbed_official 107:414e9c822e99 61 * - Performs transfers to/from APB communication serial peripherals
mbed_official 107:414e9c822e99 62 * - Supports half-duplex and full-duplex peripherals
mbed_official 107:414e9c822e99 63 *
mbed_official 107:414e9c822e99 64 * Devices from the following series can use this module:
mbed_official 107:414e9c822e99 65 * - Atmel | SMART SAM3A
mbed_official 107:414e9c822e99 66 * - Atmel | SMART SAM3N
mbed_official 107:414e9c822e99 67 * - Atmel | SMART SAM3S
mbed_official 107:414e9c822e99 68 * - Atmel | SMART SAM3U
mbed_official 107:414e9c822e99 69 * - Atmel | SMART SAM3X
mbed_official 107:414e9c822e99 70 * - Atmel | SMART SAM4E
mbed_official 107:414e9c822e99 71 * - Atmel | SMART SAM4N
mbed_official 107:414e9c822e99 72 * - Atmel | SMART SAM4S
mbed_official 107:414e9c822e99 73 * - Atmel | SMART SAM G
mbed_official 107:414e9c822e99 74 *
mbed_official 107:414e9c822e99 75 * The outline of this documentation is as follows:
mbed_official 107:414e9c822e99 76 * - \ref asfdoc_sam_drivers_pdc_prerequisites
mbed_official 107:414e9c822e99 77 * - \ref asfdoc_sam_drivers_pdc_module_overview
mbed_official 107:414e9c822e99 78 * - \ref asfdoc_sam_drivers_pdc_special_considerations
mbed_official 107:414e9c822e99 79 * - \ref asfdoc_sam_drivers_pdc_extra_info
mbed_official 107:414e9c822e99 80 * - \ref asfdoc_sam_drivers_pdc_examples
mbed_official 107:414e9c822e99 81 * - \ref asfdoc_sam_drivers_pdc_api_overview
mbed_official 107:414e9c822e99 82 *
mbed_official 107:414e9c822e99 83 *
mbed_official 107:414e9c822e99 84 * \section asfdoc_sam_drivers_pdc_prerequisites Prerequisites
mbed_official 107:414e9c822e99 85 *
mbed_official 107:414e9c822e99 86 * There are no prerequisites for this module.
mbed_official 107:414e9c822e99 87 *
mbed_official 107:414e9c822e99 88 *
mbed_official 107:414e9c822e99 89 * \section asfdoc_sam_drivers_pdc_module_overview Module Overview
mbed_official 107:414e9c822e99 90 * The user interface of each PDC channel is integrated into the user interface
mbed_official 107:414e9c822e99 91 * of the peripheral it serves. The user interface of unidirectional channels
mbed_official 107:414e9c822e99 92 * (receive only or transmit only), contains two 32-bit memory pointers and
mbed_official 107:414e9c822e99 93 * two 16-bit counters, one set (pointer, counter) for current transfer and
mbed_official 107:414e9c822e99 94 * one set (pointer, counter) for next transfer. The bidirectional channel
mbed_official 107:414e9c822e99 95 * user interface contains four 32-bit memory pointers and four 16-bit counters.
mbed_official 107:414e9c822e99 96 * Each set (pointer, counter) is used by current transmit, next transmit,
mbed_official 107:414e9c822e99 97 * current receive and next receive. Using the PDC removes processor overhead
mbed_official 107:414e9c822e99 98 * by reducing its intervention during the transfer. This significantly reduces
mbed_official 107:414e9c822e99 99 * the number of clock cycles required for a data transfer, which improves
mbed_official 107:414e9c822e99 100 * microcontroller performance. To launch a transfer, the peripheral triggers
mbed_official 107:414e9c822e99 101 * its associated PDC channels by using transmit and receive signals.
mbed_official 107:414e9c822e99 102 * When the programmed data is transferred, an end of transfer interrupt is
mbed_official 107:414e9c822e99 103 * generated by the peripheral itself.
mbed_official 107:414e9c822e99 104 *
mbed_official 107:414e9c822e99 105 * \section asfdoc_sam_drivers_pdc_special_considerations Special Considerations
mbed_official 107:414e9c822e99 106 * There are no special considerations for this module.
mbed_official 107:414e9c822e99 107 *
mbed_official 107:414e9c822e99 108 *
mbed_official 107:414e9c822e99 109 * \section asfdoc_sam_drivers_pdc_extra_info Extra Information
mbed_official 107:414e9c822e99 110
mbed_official 107:414e9c822e99 111 * For extra information, see \ref asfdoc_sam_drivers_pdc_extra. This includes:
mbed_official 107:414e9c822e99 112 * - \ref asfdoc_sam_drivers_pdc_extra_acronyms
mbed_official 107:414e9c822e99 113 * - \ref asfdoc_sam_drivers_pdc_extra_dependencies
mbed_official 107:414e9c822e99 114 * - \ref asfdoc_sam_drivers_pdc_extra_errata
mbed_official 107:414e9c822e99 115 * - \ref asfdoc_sam_drivers_pdc_extra_history
mbed_official 107:414e9c822e99 116 *
mbed_official 107:414e9c822e99 117 * \section asfdoc_sam_drivers_pdc_examples Examples
mbed_official 107:414e9c822e99 118 *
mbed_official 107:414e9c822e99 119 * For a list of examples related to this driver, see
mbed_official 107:414e9c822e99 120 * \ref asfdoc_sam_drivers_pdc_exqsg.
mbed_official 107:414e9c822e99 121 *
mbed_official 107:414e9c822e99 122 *
mbed_official 107:414e9c822e99 123 * \section asfdoc_sam_drivers_pdc_api_overview API Overview
mbed_official 107:414e9c822e99 124 * @{
mbed_official 107:414e9c822e99 125 */
mbed_official 107:414e9c822e99 126
mbed_official 107:414e9c822e99 127 #include <compiler.h>
mbed_official 107:414e9c822e99 128
mbed_official 107:414e9c822e99 129 /// @cond
mbed_official 107:414e9c822e99 130 /**INDENT-OFF**/
mbed_official 107:414e9c822e99 131 #ifdef __cplusplus
mbed_official 107:414e9c822e99 132 extern "C" {
mbed_official 107:414e9c822e99 133 #endif
mbed_official 107:414e9c822e99 134 /**INDENT-ON**/
mbed_official 107:414e9c822e99 135 /// @endcond
mbed_official 107:414e9c822e99 136
mbed_official 107:414e9c822e99 137 /**
mbed_official 107:414e9c822e99 138 * \brief PDC data packet for transfer.
mbed_official 107:414e9c822e99 139 */
mbed_official 107:414e9c822e99 140 typedef struct pdc_packet {
mbed_official 107:414e9c822e99 141 /** Start address of the transfer packet data. */
mbed_official 107:414e9c822e99 142 uint32_t ul_addr;
mbed_official 107:414e9c822e99 143 /** Transfer packet size (in units of the peripheral data width). */
mbed_official 107:414e9c822e99 144 uint32_t ul_size;
mbed_official 107:414e9c822e99 145 } pdc_packet_t;
mbed_official 107:414e9c822e99 146
mbed_official 107:414e9c822e99 147 void pdc_tx_init(Pdc *p_pdc, pdc_packet_t *p_packet,
mbed_official 107:414e9c822e99 148 pdc_packet_t *p_next_packet);
mbed_official 107:414e9c822e99 149 void pdc_rx_init(Pdc *p_pdc, pdc_packet_t *p_packet,
mbed_official 107:414e9c822e99 150 pdc_packet_t *p_next_packet);
mbed_official 107:414e9c822e99 151 void pdc_rx_clear_cnt(Pdc *p_pdc);
mbed_official 107:414e9c822e99 152 void pdc_enable_transfer(Pdc *p_pdc, uint32_t ul_controls);
mbed_official 107:414e9c822e99 153 void pdc_disable_transfer(Pdc *p_pdc, uint32_t ul_controls);
mbed_official 107:414e9c822e99 154 uint32_t pdc_read_status(Pdc *p_pdc);
mbed_official 107:414e9c822e99 155 uint32_t pdc_read_rx_ptr(Pdc *p_pdc);
mbed_official 107:414e9c822e99 156 uint32_t pdc_read_rx_counter(Pdc *p_pdc);
mbed_official 107:414e9c822e99 157 uint32_t pdc_read_tx_ptr(Pdc *p_pdc);
mbed_official 107:414e9c822e99 158 uint32_t pdc_read_tx_counter(Pdc *p_pdc);
mbed_official 107:414e9c822e99 159 uint32_t pdc_read_rx_next_ptr(Pdc *p_pdc);
mbed_official 107:414e9c822e99 160 uint32_t pdc_read_rx_next_counter(Pdc *p_pdc);
mbed_official 107:414e9c822e99 161 uint32_t pdc_read_tx_next_ptr(Pdc *p_pdc);
mbed_official 107:414e9c822e99 162 uint32_t pdc_read_tx_next_counter(Pdc *p_pdc);
mbed_official 107:414e9c822e99 163
mbed_official 107:414e9c822e99 164 /// @cond
mbed_official 107:414e9c822e99 165 /**INDENT-OFF**/
mbed_official 107:414e9c822e99 166 #ifdef __cplusplus
mbed_official 107:414e9c822e99 167 }
mbed_official 107:414e9c822e99 168 #endif
mbed_official 107:414e9c822e99 169 /**INDENT-ON**/
mbed_official 107:414e9c822e99 170 /// @endcond
mbed_official 107:414e9c822e99 171
mbed_official 107:414e9c822e99 172 /** @} */
mbed_official 107:414e9c822e99 173
mbed_official 107:414e9c822e99 174 /**
mbed_official 107:414e9c822e99 175 * \page asfdoc_sam_drivers_pdc_extra Extra Information for Peripheral DMA Controller
mbed_official 107:414e9c822e99 176 *
mbed_official 107:414e9c822e99 177 * \section asfdoc_sam_drivers_pdc_extra_acronyms Acronyms
mbed_official 107:414e9c822e99 178 * Below is a table listing the acronyms used in this module, along with their
mbed_official 107:414e9c822e99 179 * intended meanings.
mbed_official 107:414e9c822e99 180 *
mbed_official 107:414e9c822e99 181 * <table>
mbed_official 107:414e9c822e99 182 * <tr>
mbed_official 107:414e9c822e99 183 * <th>Acronym</th>
mbed_official 107:414e9c822e99 184 * <th>Definition</th>
mbed_official 107:414e9c822e99 185 * </tr>
mbed_official 107:414e9c822e99 186 * </tr>
mbed_official 107:414e9c822e99 187 * <tr>
mbed_official 107:414e9c822e99 188 * <td>AHB</td>
mbed_official 107:414e9c822e99 189 * <td>Advanced High-performance Bus</td>
mbed_official 107:414e9c822e99 190 * </tr>
mbed_official 107:414e9c822e99 191 * <tr>
mbed_official 107:414e9c822e99 192 * <td>AMBA</td>
mbed_official 107:414e9c822e99 193 * <td> Advanced Microcontroller Bus Architecture</td>
mbed_official 107:414e9c822e99 194 * </tr>
mbed_official 107:414e9c822e99 195 * <tr>
mbed_official 107:414e9c822e99 196 * <td>QSG</td>
mbed_official 107:414e9c822e99 197 * <td>Quick Start Guide</td>
mbed_official 107:414e9c822e99 198 *
mbed_official 107:414e9c822e99 199 * </tr>
mbed_official 107:414e9c822e99 200 * <tr>
mbed_official 107:414e9c822e99 201 * <td>RCR</td>
mbed_official 107:414e9c822e99 202 * <td>Receive Counter Register</td>
mbed_official 107:414e9c822e99 203 * </tr>
mbed_official 107:414e9c822e99 204 * <tr>
mbed_official 107:414e9c822e99 205 * <td>RNCR</td>
mbed_official 107:414e9c822e99 206 * <td>Return Receive Next Counter Register</td>
mbed_official 107:414e9c822e99 207 * </tr>
mbed_official 107:414e9c822e99 208 * <tr>
mbed_official 107:414e9c822e99 209 * <td>RNPR</td>
mbed_official 107:414e9c822e99 210 * <td>Receive Next Pointer Register</td>
mbed_official 107:414e9c822e99 211 * </tr>
mbed_official 107:414e9c822e99 212 * <tr>
mbed_official 107:414e9c822e99 213 * <td>RPR</td>
mbed_official 107:414e9c822e99 214 * <td>Receive Pointer Register</td>
mbed_official 107:414e9c822e99 215 * </tr>
mbed_official 107:414e9c822e99 216 * <tr>
mbed_official 107:414e9c822e99 217 * <td>TCR</td>
mbed_official 107:414e9c822e99 218 * <td>Transmit Counter Register</td>
mbed_official 107:414e9c822e99 219 * </tr>
mbed_official 107:414e9c822e99 220 * <tr>
mbed_official 107:414e9c822e99 221 * <td>TNCR</td>
mbed_official 107:414e9c822e99 222 * <td>Transmit Next Counter Register</td>
mbed_official 107:414e9c822e99 223 * </tr>
mbed_official 107:414e9c822e99 224 * <tr>
mbed_official 107:414e9c822e99 225 * <td>TNPR</td>
mbed_official 107:414e9c822e99 226 * <td>Transmit Next Pointer Register</td>
mbed_official 107:414e9c822e99 227 * </tr>
mbed_official 107:414e9c822e99 228 * <tr>
mbed_official 107:414e9c822e99 229 * <td>TPR</td>
mbed_official 107:414e9c822e99 230 * <td>Transmit Pointer Register</td>
mbed_official 107:414e9c822e99 231 * </tr>
mbed_official 107:414e9c822e99 232 * </table>
mbed_official 107:414e9c822e99 233 *
mbed_official 107:414e9c822e99 234 *
mbed_official 107:414e9c822e99 235 * \section asfdoc_sam_drivers_pdc_extra_dependencies Dependencies
mbed_official 107:414e9c822e99 236 * This driver has the following dependencies:
mbed_official 107:414e9c822e99 237 *
mbed_official 107:414e9c822e99 238 * - None
mbed_official 107:414e9c822e99 239 *
mbed_official 107:414e9c822e99 240 *
mbed_official 107:414e9c822e99 241 * \section asfdoc_sam_drivers_pdc_extra_errata Errata
mbed_official 107:414e9c822e99 242 * There are no errata related to this driver.
mbed_official 107:414e9c822e99 243 *
mbed_official 107:414e9c822e99 244 *
mbed_official 107:414e9c822e99 245 * \section asfdoc_sam_drivers_pdc_extra_history Module History
mbed_official 107:414e9c822e99 246 * An overview of the module history is presented in the table below, with
mbed_official 107:414e9c822e99 247 * details on the enhancements and fixes made to the module since its first
mbed_official 107:414e9c822e99 248 * release. The current version of this corresponds to the newest version in
mbed_official 107:414e9c822e99 249 * the table.
mbed_official 107:414e9c822e99 250 *
mbed_official 107:414e9c822e99 251 * <table>
mbed_official 107:414e9c822e99 252 * <tr>
mbed_official 107:414e9c822e99 253 * <th>Changelog</th>
mbed_official 107:414e9c822e99 254 * </tr>
mbed_official 107:414e9c822e99 255 * <tr>
mbed_official 107:414e9c822e99 256 * <td>Initial document release</td>
mbed_official 107:414e9c822e99 257 * </tr>
mbed_official 107:414e9c822e99 258 * </table>
mbed_official 107:414e9c822e99 259 *
mbed_official 107:414e9c822e99 260 *
mbed_official 107:414e9c822e99 261 *
mbed_official 107:414e9c822e99 262 * \page asfdoc_sam_pdc_quickstart_basic Quick Start Guide for PDC - Basic
mbed_official 107:414e9c822e99 263 * This is the quickstart guide for \ref asfdoc_sam_drivers_pdc_group
mbed_official 107:414e9c822e99 264 * with step-by-step instructions on how to configure and use the driver.
mbed_official 107:414e9c822e99 265 *
mbed_official 107:414e9c822e99 266 *
mbed_official 107:414e9c822e99 267 * A handler is required for the interrupt, below is a simple example:
mbed_official 107:414e9c822e99 268 * \snippet pdc_uart_example.c int_handler
mbed_official 107:414e9c822e99 269 *
mbed_official 107:414e9c822e99 270 * First initialise the board:
mbed_official 107:414e9c822e99 271 *
mbed_official 107:414e9c822e99 272 * \snippet pdc_uart_example.c board_setup
mbed_official 107:414e9c822e99 273 *
mbed_official 107:414e9c822e99 274 * Now setup the PDC registers:
mbed_official 107:414e9c822e99 275 * \snippet pdc_uart_example.c pdc_config
mbed_official 107:414e9c822e99 276 *
mbed_official 107:414e9c822e99 277 * Enable UART IRQ:
mbed_official 107:414e9c822e99 278 * \snippet pdc_uart_example.c uart_irq
mbed_official 107:414e9c822e99 279 *
mbed_official 107:414e9c822e99 280 * Enable UART interrupt
mbed_official 107:414e9c822e99 281 * \snippet pdc_uart_example.c uart_nvic_irq
mbed_official 107:414e9c822e99 282 *
mbed_official 107:414e9c822e99 283 * Once the required number of bytes have been transferred, an interrupt is
mbed_official 107:414e9c822e99 284 * triggered and the handler will run. The main program may execute other code
mbed_official 107:414e9c822e99 285 * or be busy-waiting:
mbed_official 107:414e9c822e99 286 *
mbed_official 107:414e9c822e99 287 * \snippet pdc_uart_example.c busy_waiting
mbed_official 107:414e9c822e99 288 *
mbed_official 107:414e9c822e99 289 * \page asfdoc_sam_drivers_pdc_exqsg Examples for Peripheral DMA Controller
mbed_official 107:414e9c822e99 290 *
mbed_official 107:414e9c822e99 291 * This is a list of the available Quick Start guides (QSGs) and example
mbed_official 107:414e9c822e99 292 * applications for \ref asfdoc_sam_drivers_pdc_group. QSGs are simple examples with
mbed_official 107:414e9c822e99 293 * step-by-step instructions to configure and use this driver in a selection of
mbed_official 107:414e9c822e99 294 * use cases. Note that a QSG can be compiled as a standalone application or be
mbed_official 107:414e9c822e99 295 * added to the user application.
mbed_official 107:414e9c822e99 296 *
mbed_official 107:414e9c822e99 297 * - \subpage asfdoc_sam_pdc_quickstart_basic
mbed_official 107:414e9c822e99 298 * - \subpage asfdoc_sam_drivers_pdc_example
mbed_official 107:414e9c822e99 299 *
mbed_official 107:414e9c822e99 300 *
mbed_official 107:414e9c822e99 301 * \page asfdoc_sam_drivers_pdc_document_revision_history Document Revision History
mbed_official 107:414e9c822e99 302 *
mbed_official 107:414e9c822e99 303 * <table>
mbed_official 107:414e9c822e99 304 * <tr>
mbed_official 107:414e9c822e99 305 * <th>Doc. Rev.</td>
mbed_official 107:414e9c822e99 306 * <th>Date</td>
mbed_official 107:414e9c822e99 307 * <th>Comments</td>
mbed_official 107:414e9c822e99 308 * </tr>
mbed_official 107:414e9c822e99 309 * <tr>
mbed_official 107:414e9c822e99 310 * <td>42316B</td>
mbed_official 107:414e9c822e99 311 * <td>07/2015</td>
mbed_official 107:414e9c822e99 312 * <td>Updated title of application note and added list of supported devices</td>
mbed_official 107:414e9c822e99 313 * </tr>
mbed_official 107:414e9c822e99 314 * <tr>
mbed_official 107:414e9c822e99 315 * <td>42316A</td>
mbed_official 107:414e9c822e99 316 * <td>05/2014</td>
mbed_official 107:414e9c822e99 317 * <td>Initial document release</td>
mbed_official 107:414e9c822e99 318 * </tr>
mbed_official 107:414e9c822e99 319 * </table>
mbed_official 107:414e9c822e99 320 *
mbed_official 107:414e9c822e99 321 */
mbed_official 107:414e9c822e99 322
mbed_official 107:414e9c822e99 323 #endif /* PDC_H_INCLUDED */