Amit Gandhi / mbed-dev_2

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 SAM4 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 #include "pdc.h"
mbed_official 107:414e9c822e99 48
mbed_official 107:414e9c822e99 49 /// @cond
mbed_official 107:414e9c822e99 50 /**INDENT-OFF**/
mbed_official 107:414e9c822e99 51 #ifdef __cplusplus
mbed_official 107:414e9c822e99 52 extern "C" {
mbed_official 107:414e9c822e99 53 #endif
mbed_official 107:414e9c822e99 54 /**INDENT-ON**/
mbed_official 107:414e9c822e99 55 /// @endcond
mbed_official 107:414e9c822e99 56
mbed_official 107:414e9c822e99 57 /**
mbed_official 107:414e9c822e99 58 * \brief Configure PDC for data transmit.
mbed_official 107:414e9c822e99 59 *
mbed_official 107:414e9c822e99 60 * \param[out] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 61 * \param[in] p_packet Pointer to packet information for current buffer register
mbed_official 107:414e9c822e99 62 * set. Use NULL to leave unaltered.
mbed_official 107:414e9c822e99 63 * \param[in] p_next_packet Pointer to packet information for next buffer register
mbed_official 107:414e9c822e99 64 * set. Use NULL to leave unaltered.
mbed_official 107:414e9c822e99 65 */
mbed_official 107:414e9c822e99 66 void pdc_tx_init(
mbed_official 107:414e9c822e99 67 Pdc *p_pdc,
mbed_official 107:414e9c822e99 68 pdc_packet_t *p_packet,
mbed_official 107:414e9c822e99 69 pdc_packet_t *p_next_packet)
mbed_official 107:414e9c822e99 70 {
mbed_official 107:414e9c822e99 71 /* Validate inputs. */
mbed_official 107:414e9c822e99 72 Assert(p_pdc);
mbed_official 107:414e9c822e99 73
mbed_official 107:414e9c822e99 74 if (p_packet) {
mbed_official 107:414e9c822e99 75 p_pdc->PERIPH_TPR = p_packet->ul_addr;
mbed_official 107:414e9c822e99 76 p_pdc->PERIPH_TCR = p_packet->ul_size;
mbed_official 107:414e9c822e99 77 }
mbed_official 107:414e9c822e99 78 if (p_next_packet) {
mbed_official 107:414e9c822e99 79 p_pdc->PERIPH_TNPR = p_next_packet->ul_addr;
mbed_official 107:414e9c822e99 80 p_pdc->PERIPH_TNCR = p_next_packet->ul_size;
mbed_official 107:414e9c822e99 81 }
mbed_official 107:414e9c822e99 82 }
mbed_official 107:414e9c822e99 83
mbed_official 107:414e9c822e99 84 /**
mbed_official 107:414e9c822e99 85 * \brief Configure PDC for data receive.
mbed_official 107:414e9c822e99 86 *
mbed_official 107:414e9c822e99 87 * \param[out] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 88 * \param[in] p_packet Pointer to packet information for current buffer register
mbed_official 107:414e9c822e99 89 * set. Use NULL to leave unaltered.
mbed_official 107:414e9c822e99 90 * \param[in] p_next_packet Pointer to packet information for next buffer register
mbed_official 107:414e9c822e99 91 * set. Use NULL to leave unaltered.
mbed_official 107:414e9c822e99 92 */
mbed_official 107:414e9c822e99 93 void pdc_rx_init(
mbed_official 107:414e9c822e99 94 Pdc *p_pdc,
mbed_official 107:414e9c822e99 95 pdc_packet_t *p_packet,
mbed_official 107:414e9c822e99 96 pdc_packet_t *p_next_packet)
mbed_official 107:414e9c822e99 97 {
mbed_official 107:414e9c822e99 98 /* Validate inputs. */
mbed_official 107:414e9c822e99 99 Assert(p_pdc);
mbed_official 107:414e9c822e99 100
mbed_official 107:414e9c822e99 101 if (p_packet) {
mbed_official 107:414e9c822e99 102 p_pdc->PERIPH_RPR = p_packet->ul_addr;
mbed_official 107:414e9c822e99 103 p_pdc->PERIPH_RCR = p_packet->ul_size;
mbed_official 107:414e9c822e99 104 }
mbed_official 107:414e9c822e99 105 if (p_next_packet) {
mbed_official 107:414e9c822e99 106 p_pdc->PERIPH_RNPR = p_next_packet->ul_addr;
mbed_official 107:414e9c822e99 107 p_pdc->PERIPH_RNCR = p_next_packet->ul_size;
mbed_official 107:414e9c822e99 108 }
mbed_official 107:414e9c822e99 109 }
mbed_official 107:414e9c822e99 110
mbed_official 107:414e9c822e99 111 /**
mbed_official 107:414e9c822e99 112 * \brief Clear PDC buffer receive counter.
mbed_official 107:414e9c822e99 113 *
mbed_official 107:414e9c822e99 114 * \param[out] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 115 */
mbed_official 107:414e9c822e99 116 void pdc_rx_clear_cnt(
mbed_official 107:414e9c822e99 117 Pdc *p_pdc)
mbed_official 107:414e9c822e99 118 {
mbed_official 107:414e9c822e99 119 /* Validate inputs. */
mbed_official 107:414e9c822e99 120 Assert(p_pdc);
mbed_official 107:414e9c822e99 121
mbed_official 107:414e9c822e99 122 p_pdc->PERIPH_RNCR = 0;
mbed_official 107:414e9c822e99 123 p_pdc->PERIPH_RCR = 0;
mbed_official 107:414e9c822e99 124 }
mbed_official 107:414e9c822e99 125
mbed_official 107:414e9c822e99 126 /**
mbed_official 107:414e9c822e99 127 * \brief Enable PDC transfers (TX and/or RX).
mbed_official 107:414e9c822e99 128 *
mbed_official 107:414e9c822e99 129 * \note It is forbidden to set both TXTEN and RXTEN for a half duplex
mbed_official 107:414e9c822e99 130 * peripheral.
mbed_official 107:414e9c822e99 131 *
mbed_official 107:414e9c822e99 132 * \param[out] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 133 * \param[in] ul_controls Transfer directions
mbed_official 107:414e9c822e99 134 * (bit PERIPH_PTCR_RXTEN and bit PERIPH_PTCR_TXTEN)
mbed_official 107:414e9c822e99 135 */
mbed_official 107:414e9c822e99 136 void pdc_enable_transfer(
mbed_official 107:414e9c822e99 137 Pdc *p_pdc,
mbed_official 107:414e9c822e99 138 uint32_t ul_controls)
mbed_official 107:414e9c822e99 139 {
mbed_official 107:414e9c822e99 140 /* Validate inputs. */
mbed_official 107:414e9c822e99 141 Assert(p_pdc);
mbed_official 107:414e9c822e99 142
mbed_official 107:414e9c822e99 143 p_pdc->PERIPH_PTCR =
mbed_official 107:414e9c822e99 144 ul_controls & (PERIPH_PTCR_RXTEN | PERIPH_PTCR_TXTEN);
mbed_official 107:414e9c822e99 145 }
mbed_official 107:414e9c822e99 146
mbed_official 107:414e9c822e99 147 /**
mbed_official 107:414e9c822e99 148 * \brief Disable PDC transfers (TX and/or RX).
mbed_official 107:414e9c822e99 149 *
mbed_official 107:414e9c822e99 150 * \param[out] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 151 * \param[in] ul_controls Transfer directions
mbed_official 107:414e9c822e99 152 * (bit PERIPH_PTCR_TXTDIS, bit PERIPH_PTCR_TXTDIS)
mbed_official 107:414e9c822e99 153 */
mbed_official 107:414e9c822e99 154 void pdc_disable_transfer(
mbed_official 107:414e9c822e99 155 Pdc *p_pdc,
mbed_official 107:414e9c822e99 156 uint32_t ul_controls)
mbed_official 107:414e9c822e99 157 {
mbed_official 107:414e9c822e99 158 /* Validate inputs. */
mbed_official 107:414e9c822e99 159 Assert(p_pdc);
mbed_official 107:414e9c822e99 160
mbed_official 107:414e9c822e99 161 p_pdc->PERIPH_PTCR =
mbed_official 107:414e9c822e99 162 ul_controls & (PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS);
mbed_official 107:414e9c822e99 163 }
mbed_official 107:414e9c822e99 164
mbed_official 107:414e9c822e99 165 /**
mbed_official 107:414e9c822e99 166 * \brief Read PDC status.
mbed_official 107:414e9c822e99 167 *
mbed_official 107:414e9c822e99 168 * \param[in] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 169 *
mbed_official 107:414e9c822e99 170 * \return PDC status register bit map.
mbed_official 107:414e9c822e99 171 *
mbed_official 107:414e9c822e99 172 * <table>
mbed_official 107:414e9c822e99 173 * <tr>
mbed_official 107:414e9c822e99 174 * <th>Name</th>
mbed_official 107:414e9c822e99 175 * <th>Description</th>
mbed_official 107:414e9c822e99 176 * <th>Bit</th>
mbed_official 107:414e9c822e99 177 * </tr>
mbed_official 107:414e9c822e99 178 * <tr>
mbed_official 107:414e9c822e99 179 * <td>RXTEN</td>
mbed_official 107:414e9c822e99 180 * <td>Receiver Transfer Enabled</td>
mbed_official 107:414e9c822e99 181 * <td>8</td>
mbed_official 107:414e9c822e99 182 * </tr>
mbed_official 107:414e9c822e99 183 * <tr>
mbed_official 107:414e9c822e99 184 * <td>TXTEN</td>
mbed_official 107:414e9c822e99 185 * <td>Transmitter Transfer Enabled</td>
mbed_official 107:414e9c822e99 186 * <td>1</td>
mbed_official 107:414e9c822e99 187 * </tr>
mbed_official 107:414e9c822e99 188 * </table>
mbed_official 107:414e9c822e99 189 *
mbed_official 107:414e9c822e99 190 */
mbed_official 107:414e9c822e99 191 uint32_t pdc_read_status(
mbed_official 107:414e9c822e99 192 Pdc *p_pdc)
mbed_official 107:414e9c822e99 193 {
mbed_official 107:414e9c822e99 194 /* Validate inputs. */
mbed_official 107:414e9c822e99 195 Assert(p_pdc);
mbed_official 107:414e9c822e99 196
mbed_official 107:414e9c822e99 197 return p_pdc->PERIPH_PTSR;
mbed_official 107:414e9c822e99 198 }
mbed_official 107:414e9c822e99 199
mbed_official 107:414e9c822e99 200 /**
mbed_official 107:414e9c822e99 201 * \brief Return Receive Pointer Register (RPR) value.
mbed_official 107:414e9c822e99 202 *
mbed_official 107:414e9c822e99 203 * \param[in] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 204 *
mbed_official 107:414e9c822e99 205 * \return Receive Pointer Register value.
mbed_official 107:414e9c822e99 206 */
mbed_official 107:414e9c822e99 207 uint32_t pdc_read_rx_ptr(
mbed_official 107:414e9c822e99 208 Pdc *p_pdc)
mbed_official 107:414e9c822e99 209 {
mbed_official 107:414e9c822e99 210 /* Validate inputs. */
mbed_official 107:414e9c822e99 211 Assert(p_pdc);
mbed_official 107:414e9c822e99 212
mbed_official 107:414e9c822e99 213 return p_pdc->PERIPH_RPR;
mbed_official 107:414e9c822e99 214 }
mbed_official 107:414e9c822e99 215
mbed_official 107:414e9c822e99 216 /**
mbed_official 107:414e9c822e99 217 * \brief Return Receive Counter Register (RCR) value.
mbed_official 107:414e9c822e99 218 *
mbed_official 107:414e9c822e99 219 * \param[in] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 220 *
mbed_official 107:414e9c822e99 221 * \return Receive Counter Register value.
mbed_official 107:414e9c822e99 222 */
mbed_official 107:414e9c822e99 223 uint32_t pdc_read_rx_counter(
mbed_official 107:414e9c822e99 224 Pdc *p_pdc)
mbed_official 107:414e9c822e99 225 {
mbed_official 107:414e9c822e99 226 /* Validate inputs. */
mbed_official 107:414e9c822e99 227 Assert(p_pdc);
mbed_official 107:414e9c822e99 228
mbed_official 107:414e9c822e99 229 return p_pdc->PERIPH_RCR;
mbed_official 107:414e9c822e99 230 }
mbed_official 107:414e9c822e99 231
mbed_official 107:414e9c822e99 232 /**
mbed_official 107:414e9c822e99 233 * \brief Return Transmit Pointer Register (TPR) value.
mbed_official 107:414e9c822e99 234 *
mbed_official 107:414e9c822e99 235 * \param[in] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 236 *
mbed_official 107:414e9c822e99 237 * \return Transmit Pointer Register value.
mbed_official 107:414e9c822e99 238 */
mbed_official 107:414e9c822e99 239 uint32_t pdc_read_tx_ptr(
mbed_official 107:414e9c822e99 240 Pdc *p_pdc)
mbed_official 107:414e9c822e99 241 {
mbed_official 107:414e9c822e99 242 /* Validate inputs. */
mbed_official 107:414e9c822e99 243 Assert(p_pdc);
mbed_official 107:414e9c822e99 244
mbed_official 107:414e9c822e99 245 return p_pdc->PERIPH_TPR;
mbed_official 107:414e9c822e99 246 }
mbed_official 107:414e9c822e99 247
mbed_official 107:414e9c822e99 248 /**
mbed_official 107:414e9c822e99 249 * \brief Return Transmit Counter Register (TCR) value.
mbed_official 107:414e9c822e99 250 *
mbed_official 107:414e9c822e99 251 * \param[in] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 252 *
mbed_official 107:414e9c822e99 253 * \return Transmit Counter Register value.
mbed_official 107:414e9c822e99 254 */
mbed_official 107:414e9c822e99 255 uint32_t pdc_read_tx_counter(
mbed_official 107:414e9c822e99 256 Pdc *p_pdc)
mbed_official 107:414e9c822e99 257 {
mbed_official 107:414e9c822e99 258 /* Validate inputs. */
mbed_official 107:414e9c822e99 259 Assert(p_pdc);
mbed_official 107:414e9c822e99 260
mbed_official 107:414e9c822e99 261 return p_pdc->PERIPH_TCR;
mbed_official 107:414e9c822e99 262 }
mbed_official 107:414e9c822e99 263
mbed_official 107:414e9c822e99 264 /**
mbed_official 107:414e9c822e99 265 * \brief Return Receive Next Pointer Register (RNPR) value.
mbed_official 107:414e9c822e99 266 *
mbed_official 107:414e9c822e99 267 * \param[in] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 268 *
mbed_official 107:414e9c822e99 269 * \return Receive Next Pointer Register value.
mbed_official 107:414e9c822e99 270 */
mbed_official 107:414e9c822e99 271 uint32_t pdc_read_rx_next_ptr(
mbed_official 107:414e9c822e99 272 Pdc *p_pdc)
mbed_official 107:414e9c822e99 273 {
mbed_official 107:414e9c822e99 274 /* Validate inputs. */
mbed_official 107:414e9c822e99 275 Assert(p_pdc);
mbed_official 107:414e9c822e99 276
mbed_official 107:414e9c822e99 277 return p_pdc->PERIPH_RNPR;
mbed_official 107:414e9c822e99 278 }
mbed_official 107:414e9c822e99 279
mbed_official 107:414e9c822e99 280 /**
mbed_official 107:414e9c822e99 281 * \brief Return Receive Next Counter Register (RNCR) value.
mbed_official 107:414e9c822e99 282 *
mbed_official 107:414e9c822e99 283 * \param[in] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 284 *
mbed_official 107:414e9c822e99 285 * \return Receive Next Counter Register value.
mbed_official 107:414e9c822e99 286 */
mbed_official 107:414e9c822e99 287 uint32_t pdc_read_rx_next_counter(
mbed_official 107:414e9c822e99 288 Pdc *p_pdc)
mbed_official 107:414e9c822e99 289 {
mbed_official 107:414e9c822e99 290 /* Validate inputs. */
mbed_official 107:414e9c822e99 291 Assert(p_pdc);
mbed_official 107:414e9c822e99 292
mbed_official 107:414e9c822e99 293 return p_pdc->PERIPH_RNCR;
mbed_official 107:414e9c822e99 294 }
mbed_official 107:414e9c822e99 295
mbed_official 107:414e9c822e99 296 /**
mbed_official 107:414e9c822e99 297 * \brief Return Transmit Next Pointer Register (TNPR) value.
mbed_official 107:414e9c822e99 298 *
mbed_official 107:414e9c822e99 299 * \param[in] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 300 *
mbed_official 107:414e9c822e99 301 * \return Transmit Next Pointer Register value.
mbed_official 107:414e9c822e99 302 */
mbed_official 107:414e9c822e99 303 uint32_t pdc_read_tx_next_ptr(
mbed_official 107:414e9c822e99 304 Pdc *p_pdc)
mbed_official 107:414e9c822e99 305 {
mbed_official 107:414e9c822e99 306 /* Validate inputs. */
mbed_official 107:414e9c822e99 307 Assert(p_pdc);
mbed_official 107:414e9c822e99 308
mbed_official 107:414e9c822e99 309 return p_pdc->PERIPH_TNPR;
mbed_official 107:414e9c822e99 310 }
mbed_official 107:414e9c822e99 311
mbed_official 107:414e9c822e99 312 /**
mbed_official 107:414e9c822e99 313 * \brief Return Transmit Next Counter Register (TNCR) value.
mbed_official 107:414e9c822e99 314 *
mbed_official 107:414e9c822e99 315 * \param[in] p_pdc Device structure pointer
mbed_official 107:414e9c822e99 316 *
mbed_official 107:414e9c822e99 317 * \return Transmit Next Counter Register value.
mbed_official 107:414e9c822e99 318 */
mbed_official 107:414e9c822e99 319 uint32_t pdc_read_tx_next_counter(
mbed_official 107:414e9c822e99 320 Pdc *p_pdc)
mbed_official 107:414e9c822e99 321 {
mbed_official 107:414e9c822e99 322 /* Validate inputs. */
mbed_official 107:414e9c822e99 323 Assert(p_pdc);
mbed_official 107:414e9c822e99 324
mbed_official 107:414e9c822e99 325 return p_pdc->PERIPH_TNCR;
mbed_official 107:414e9c822e99 326 }
mbed_official 107:414e9c822e99 327
mbed_official 107:414e9c822e99 328 /// @cond
mbed_official 107:414e9c822e99 329 /**INDENT-OFF**/
mbed_official 107:414e9c822e99 330 #ifdef __cplusplus
mbed_official 107:414e9c822e99 331 }
mbed_official 107:414e9c822e99 332 #endif
mbed_official 107:414e9c822e99 333 /**INDENT-ON**/
mbed_official 107:414e9c822e99 334 /// @endcond