Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510
targets/TARGET_Maxim/TARGET_MAX32625/mxc/spim.h@0:098463de4c5d, 2017-01-25 (annotated)
- Committer:
- group-onsemi
- Date:
- Wed Jan 25 20:34:15 2017 +0000
- Revision:
- 0:098463de4c5d
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
group-onsemi | 0:098463de4c5d | 1 | /******************************************************************************* |
group-onsemi | 0:098463de4c5d | 2 | * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. |
group-onsemi | 0:098463de4c5d | 3 | * |
group-onsemi | 0:098463de4c5d | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
group-onsemi | 0:098463de4c5d | 5 | * copy of this software and associated documentation files (the "Software"), |
group-onsemi | 0:098463de4c5d | 6 | * to deal in the Software without restriction, including without limitation |
group-onsemi | 0:098463de4c5d | 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
group-onsemi | 0:098463de4c5d | 8 | * and/or sell copies of the Software, and to permit persons to whom the |
group-onsemi | 0:098463de4c5d | 9 | * Software is furnished to do so, subject to the following conditions: |
group-onsemi | 0:098463de4c5d | 10 | * |
group-onsemi | 0:098463de4c5d | 11 | * The above copyright notice and this permission notice shall be included |
group-onsemi | 0:098463de4c5d | 12 | * in all copies or substantial portions of the Software. |
group-onsemi | 0:098463de4c5d | 13 | * |
group-onsemi | 0:098463de4c5d | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
group-onsemi | 0:098463de4c5d | 15 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
group-onsemi | 0:098463de4c5d | 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
group-onsemi | 0:098463de4c5d | 17 | * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES |
group-onsemi | 0:098463de4c5d | 18 | * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
group-onsemi | 0:098463de4c5d | 19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
group-onsemi | 0:098463de4c5d | 20 | * OTHER DEALINGS IN THE SOFTWARE. |
group-onsemi | 0:098463de4c5d | 21 | * |
group-onsemi | 0:098463de4c5d | 22 | * Except as contained in this notice, the name of Maxim Integrated |
group-onsemi | 0:098463de4c5d | 23 | * Products, Inc. shall not be used except as stated in the Maxim Integrated |
group-onsemi | 0:098463de4c5d | 24 | * Products, Inc. Branding Policy. |
group-onsemi | 0:098463de4c5d | 25 | * |
group-onsemi | 0:098463de4c5d | 26 | * The mere transfer of this software does not imply any licenses |
group-onsemi | 0:098463de4c5d | 27 | * of trade secrets, proprietary technology, copyrights, patents, |
group-onsemi | 0:098463de4c5d | 28 | * trademarks, maskwork rights, or any other form of intellectual |
group-onsemi | 0:098463de4c5d | 29 | * property whatsoever. Maxim Integrated Products, Inc. retains all |
group-onsemi | 0:098463de4c5d | 30 | * ownership rights. |
group-onsemi | 0:098463de4c5d | 31 | * |
group-onsemi | 0:098463de4c5d | 32 | * $Date: 2016-04-27 11:55:43 -0500 (Wed, 27 Apr 2016) $ |
group-onsemi | 0:098463de4c5d | 33 | * $Revision: 22541 $ |
group-onsemi | 0:098463de4c5d | 34 | * |
group-onsemi | 0:098463de4c5d | 35 | ******************************************************************************/ |
group-onsemi | 0:098463de4c5d | 36 | |
group-onsemi | 0:098463de4c5d | 37 | /** |
group-onsemi | 0:098463de4c5d | 38 | * @file spim.h |
group-onsemi | 0:098463de4c5d | 39 | * @brief SPI Master driver header file. |
group-onsemi | 0:098463de4c5d | 40 | */ |
group-onsemi | 0:098463de4c5d | 41 | |
group-onsemi | 0:098463de4c5d | 42 | #include "mxc_config.h" |
group-onsemi | 0:098463de4c5d | 43 | #include "mxc_sys.h" |
group-onsemi | 0:098463de4c5d | 44 | #include "spim_regs.h" |
group-onsemi | 0:098463de4c5d | 45 | |
group-onsemi | 0:098463de4c5d | 46 | #ifndef _SPIM_H_ |
group-onsemi | 0:098463de4c5d | 47 | #define _SPIM_H_ |
group-onsemi | 0:098463de4c5d | 48 | |
group-onsemi | 0:098463de4c5d | 49 | #ifdef __cplusplus |
group-onsemi | 0:098463de4c5d | 50 | extern "C" { |
group-onsemi | 0:098463de4c5d | 51 | #endif |
group-onsemi | 0:098463de4c5d | 52 | |
group-onsemi | 0:098463de4c5d | 53 | /***** Definitions *****/ |
group-onsemi | 0:098463de4c5d | 54 | |
group-onsemi | 0:098463de4c5d | 55 | /// @brief Active levels for slave select lines. |
group-onsemi | 0:098463de4c5d | 56 | typedef enum { |
group-onsemi | 0:098463de4c5d | 57 | SPIM_SSEL0_HIGH = (0x1 << 0), |
group-onsemi | 0:098463de4c5d | 58 | SPIM_SSEL0_LOW = 0, |
group-onsemi | 0:098463de4c5d | 59 | SPIM_SSEL1_HIGH = (0x1 << 1), |
group-onsemi | 0:098463de4c5d | 60 | SPIM_SSEL1_LOW = 0, |
group-onsemi | 0:098463de4c5d | 61 | SPIM_SSEL2_HIGH = (0x1 << 2), |
group-onsemi | 0:098463de4c5d | 62 | SPIM_SSEL2_LOW = 0, |
group-onsemi | 0:098463de4c5d | 63 | SPIM_SSEL3_HIGH = (0x1 << 3), |
group-onsemi | 0:098463de4c5d | 64 | SPIM_SSEL3_LOW = 0, |
group-onsemi | 0:098463de4c5d | 65 | SPIM_SSEL4_HIGH = (0x1 << 4), |
group-onsemi | 0:098463de4c5d | 66 | SPIM_SSEL4_LOW = 0 |
group-onsemi | 0:098463de4c5d | 67 | } |
group-onsemi | 0:098463de4c5d | 68 | spim_ssel_t; |
group-onsemi | 0:098463de4c5d | 69 | |
group-onsemi | 0:098463de4c5d | 70 | /// @brief Number of data lines to use. |
group-onsemi | 0:098463de4c5d | 71 | typedef enum { |
group-onsemi | 0:098463de4c5d | 72 | SPIM_WIDTH_1 = 0, |
group-onsemi | 0:098463de4c5d | 73 | SPIM_WIDTH_2 = 1, |
group-onsemi | 0:098463de4c5d | 74 | SPIM_WIDTH_4 = 2 |
group-onsemi | 0:098463de4c5d | 75 | } spim_width_t; |
group-onsemi | 0:098463de4c5d | 76 | |
group-onsemi | 0:098463de4c5d | 77 | /// @brief SPIM configuration type. |
group-onsemi | 0:098463de4c5d | 78 | typedef struct { |
group-onsemi | 0:098463de4c5d | 79 | uint8_t mode; ///< SPIM mode to use, 0-3. |
group-onsemi | 0:098463de4c5d | 80 | uint32_t ssel_pol; ///< Mask of active levels for slave select signals, use spim_ssel_t. |
group-onsemi | 0:098463de4c5d | 81 | uint32_t baud; ///< Baud rate in Hz. |
group-onsemi | 0:098463de4c5d | 82 | } spim_cfg_t; |
group-onsemi | 0:098463de4c5d | 83 | |
group-onsemi | 0:098463de4c5d | 84 | /// @brief SPIM Transaction request. |
group-onsemi | 0:098463de4c5d | 85 | typedef struct spim_req spim_req_t; |
group-onsemi | 0:098463de4c5d | 86 | struct spim_req { |
group-onsemi | 0:098463de4c5d | 87 | uint8_t ssel; ///< Slave select number. |
group-onsemi | 0:098463de4c5d | 88 | uint8_t deass; ///< De-assert slave select at the end of the transaction. |
group-onsemi | 0:098463de4c5d | 89 | const uint8_t *tx_data; ///< TX buffer. |
group-onsemi | 0:098463de4c5d | 90 | uint8_t *rx_data; ///< RX buffer. |
group-onsemi | 0:098463de4c5d | 91 | spim_width_t width; ///< Number of data lines to use |
group-onsemi | 0:098463de4c5d | 92 | unsigned len; ///< Number of bytes to send. |
group-onsemi | 0:098463de4c5d | 93 | unsigned read_num; ///< Number of bytes read. |
group-onsemi | 0:098463de4c5d | 94 | unsigned write_num; ///< Number of bytes written. |
group-onsemi | 0:098463de4c5d | 95 | |
group-onsemi | 0:098463de4c5d | 96 | /** |
group-onsemi | 0:098463de4c5d | 97 | * @brief Callback for asynchronous request. |
group-onsemi | 0:098463de4c5d | 98 | * @param spim_req_t* Pointer to the transaction request. |
group-onsemi | 0:098463de4c5d | 99 | * @param int Error code. |
group-onsemi | 0:098463de4c5d | 100 | */ |
group-onsemi | 0:098463de4c5d | 101 | void (*callback)(spim_req_t*, int); |
group-onsemi | 0:098463de4c5d | 102 | }; |
group-onsemi | 0:098463de4c5d | 103 | |
group-onsemi | 0:098463de4c5d | 104 | /***** Globals *****/ |
group-onsemi | 0:098463de4c5d | 105 | |
group-onsemi | 0:098463de4c5d | 106 | /***** Function Prototypes *****/ |
group-onsemi | 0:098463de4c5d | 107 | |
group-onsemi | 0:098463de4c5d | 108 | /** |
group-onsemi | 0:098463de4c5d | 109 | * @brief Initialize SPIM module. |
group-onsemi | 0:098463de4c5d | 110 | * @param spim Pointer to SPIM regs. |
group-onsemi | 0:098463de4c5d | 111 | * @param cfg Pointer to SPIM configuration. |
group-onsemi | 0:098463de4c5d | 112 | * @param sys_cfg Pointer to system configuration object |
group-onsemi | 0:098463de4c5d | 113 | * @returns #E_NO_ERROR if everything is successful |
group-onsemi | 0:098463de4c5d | 114 | */ |
group-onsemi | 0:098463de4c5d | 115 | int SPIM_Init(mxc_spim_regs_t *spim, const spim_cfg_t *cfg, const sys_cfg_spim_t *sys_cfg); |
group-onsemi | 0:098463de4c5d | 116 | |
group-onsemi | 0:098463de4c5d | 117 | /** |
group-onsemi | 0:098463de4c5d | 118 | * @brief Shutdown SPIM module. |
group-onsemi | 0:098463de4c5d | 119 | * @param spim Pointer to SPIM regs. |
group-onsemi | 0:098463de4c5d | 120 | * @returns #E_NO_ERROR if everything is successful |
group-onsemi | 0:098463de4c5d | 121 | */ |
group-onsemi | 0:098463de4c5d | 122 | int SPIM_Shutdown(mxc_spim_regs_t *spim); |
group-onsemi | 0:098463de4c5d | 123 | |
group-onsemi | 0:098463de4c5d | 124 | /** |
group-onsemi | 0:098463de4c5d | 125 | * @brief Send Clock cycles on SCK without reading or writing. |
group-onsemi | 0:098463de4c5d | 126 | * @param spim Pointer to SPIM regs. |
group-onsemi | 0:098463de4c5d | 127 | * @param len Number of clock cycles to send. |
group-onsemi | 0:098463de4c5d | 128 | * @param ssel Slave select number. |
group-onsemi | 0:098463de4c5d | 129 | * @param deass De-assert slave select at the end of the transaction. |
group-onsemi | 0:098463de4c5d | 130 | * @returns Cycles transacted if everything is successful, error if unsuccessful. |
group-onsemi | 0:098463de4c5d | 131 | */ |
group-onsemi | 0:098463de4c5d | 132 | int SPIM_Clocks(mxc_spim_regs_t *spim, uint32_t len, uint8_t ssel, uint8_t deass); |
group-onsemi | 0:098463de4c5d | 133 | |
group-onsemi | 0:098463de4c5d | 134 | /** |
group-onsemi | 0:098463de4c5d | 135 | * @brief Read/write SPIM data. Will block until transaction is complete. |
group-onsemi | 0:098463de4c5d | 136 | * @param spim Pointer to SPIM regs. |
group-onsemi | 0:098463de4c5d | 137 | * @param req Request for a SPIM transaction. |
group-onsemi | 0:098463de4c5d | 138 | * @note Callback is ignored. |
group-onsemi | 0:098463de4c5d | 139 | * @returns Bytes transacted if everything is successful, error if unsuccessful. |
group-onsemi | 0:098463de4c5d | 140 | */ |
group-onsemi | 0:098463de4c5d | 141 | int SPIM_Trans(mxc_spim_regs_t *spim, spim_req_t *req); |
group-onsemi | 0:098463de4c5d | 142 | |
group-onsemi | 0:098463de4c5d | 143 | /** |
group-onsemi | 0:098463de4c5d | 144 | * @brief Asynchronously read/write SPIM data. |
group-onsemi | 0:098463de4c5d | 145 | * @param spim Pointer to SPIM regs. |
group-onsemi | 0:098463de4c5d | 146 | * @param req Request for a SPIM transaction. |
group-onsemi | 0:098463de4c5d | 147 | * @note Request struct must remain allocated until callback. |
group-onsemi | 0:098463de4c5d | 148 | * @returns #E_NO_ERROR if everything is successful, error if unsuccessful. |
group-onsemi | 0:098463de4c5d | 149 | */ |
group-onsemi | 0:098463de4c5d | 150 | int SPIM_TransAsync(mxc_spim_regs_t *spim, spim_req_t *req); |
group-onsemi | 0:098463de4c5d | 151 | |
group-onsemi | 0:098463de4c5d | 152 | /** |
group-onsemi | 0:098463de4c5d | 153 | * @brief Abort asynchronous request. |
group-onsemi | 0:098463de4c5d | 154 | * @param req Pointer to request for a SPIM transaction. |
group-onsemi | 0:098463de4c5d | 155 | * @returns #E_NO_ERROR if request aborted, error if unsuccessful. |
group-onsemi | 0:098463de4c5d | 156 | */ |
group-onsemi | 0:098463de4c5d | 157 | int SPIM_AbortAsync(spim_req_t *req); |
group-onsemi | 0:098463de4c5d | 158 | |
group-onsemi | 0:098463de4c5d | 159 | /** |
group-onsemi | 0:098463de4c5d | 160 | * @brief SPIM interrupt handler. |
group-onsemi | 0:098463de4c5d | 161 | * @details This function should be called by the application from the interrupt |
group-onsemi | 0:098463de4c5d | 162 | * handler if SPIM interrupts are enabled. Alternately, this function |
group-onsemi | 0:098463de4c5d | 163 | * can be periodically called by the application if SPIM interrupts are |
group-onsemi | 0:098463de4c5d | 164 | * disabled. |
group-onsemi | 0:098463de4c5d | 165 | * @param spim Base address of the SPIM module. |
group-onsemi | 0:098463de4c5d | 166 | */ |
group-onsemi | 0:098463de4c5d | 167 | void SPIM_Handler(mxc_spim_regs_t *spim); |
group-onsemi | 0:098463de4c5d | 168 | |
group-onsemi | 0:098463de4c5d | 169 | /** |
group-onsemi | 0:098463de4c5d | 170 | * @brief Check the SPIM to see if it's busy. |
group-onsemi | 0:098463de4c5d | 171 | * @param spim Pointer to SPIM regs. |
group-onsemi | 0:098463de4c5d | 172 | * @returns #E_NO_ERROR if idle, #E_BUSY if in use. |
group-onsemi | 0:098463de4c5d | 173 | */ |
group-onsemi | 0:098463de4c5d | 174 | int SPIM_Busy(mxc_spim_regs_t *spim); |
group-onsemi | 0:098463de4c5d | 175 | |
group-onsemi | 0:098463de4c5d | 176 | /** |
group-onsemi | 0:098463de4c5d | 177 | * @brief Attempt to prepare the SPIM for sleep. |
group-onsemi | 0:098463de4c5d | 178 | * @param spim Pointer to SPIM regs. |
group-onsemi | 0:098463de4c5d | 179 | * @details Checks for any ongoing transactions. Disables interrupts if the SPIM |
group-onsemi | 0:098463de4c5d | 180 | is idle. |
group-onsemi | 0:098463de4c5d | 181 | * @returns #E_NO_ERROR if ready to sleep, #E_BUSY if not ready for sleep. |
group-onsemi | 0:098463de4c5d | 182 | */ |
group-onsemi | 0:098463de4c5d | 183 | int SPIM_PrepForSleep(mxc_spim_regs_t *spim); |
group-onsemi | 0:098463de4c5d | 184 | |
group-onsemi | 0:098463de4c5d | 185 | /** |
group-onsemi | 0:098463de4c5d | 186 | * @brief Enables the SPIM without overwriting existing configuration. |
group-onsemi | 0:098463de4c5d | 187 | * @param spim Pointer to SPIM regs. |
group-onsemi | 0:098463de4c5d | 188 | */ |
group-onsemi | 0:098463de4c5d | 189 | __STATIC_INLINE void SPIM_Enable(mxc_spim_regs_t *spim) |
group-onsemi | 0:098463de4c5d | 190 | { |
group-onsemi | 0:098463de4c5d | 191 | spim->gen_ctrl |= (MXC_F_SPIM_GEN_CTRL_SPI_MSTR_EN | |
group-onsemi | 0:098463de4c5d | 192 | MXC_F_SPIM_GEN_CTRL_TX_FIFO_EN | MXC_F_SPIM_GEN_CTRL_RX_FIFO_EN); |
group-onsemi | 0:098463de4c5d | 193 | } |
group-onsemi | 0:098463de4c5d | 194 | |
group-onsemi | 0:098463de4c5d | 195 | /** |
group-onsemi | 0:098463de4c5d | 196 | * @brief Drain all of the data in the RXFIFO. |
group-onsemi | 0:098463de4c5d | 197 | * @param spim Pointer to UART regs. |
group-onsemi | 0:098463de4c5d | 198 | */ |
group-onsemi | 0:098463de4c5d | 199 | __STATIC_INLINE void SPIM_DrainRX(mxc_spim_regs_t *spim) |
group-onsemi | 0:098463de4c5d | 200 | { |
group-onsemi | 0:098463de4c5d | 201 | uint32_t ctrl_save = spim->gen_ctrl; |
group-onsemi | 0:098463de4c5d | 202 | spim->gen_ctrl = (ctrl_save & ~MXC_F_SPIM_GEN_CTRL_RX_FIFO_EN); |
group-onsemi | 0:098463de4c5d | 203 | spim->gen_ctrl = ctrl_save; |
group-onsemi | 0:098463de4c5d | 204 | } |
group-onsemi | 0:098463de4c5d | 205 | |
group-onsemi | 0:098463de4c5d | 206 | /** |
group-onsemi | 0:098463de4c5d | 207 | * @brief Drain all of the data in the TXFIFO. |
group-onsemi | 0:098463de4c5d | 208 | * @param spim Pointer to UART regs. |
group-onsemi | 0:098463de4c5d | 209 | */ |
group-onsemi | 0:098463de4c5d | 210 | __STATIC_INLINE void SPIM_DrainTX(mxc_spim_regs_t *spim) |
group-onsemi | 0:098463de4c5d | 211 | { |
group-onsemi | 0:098463de4c5d | 212 | uint32_t ctrl_save = spim->gen_ctrl; |
group-onsemi | 0:098463de4c5d | 213 | spim->gen_ctrl = (ctrl_save & ~MXC_F_SPIM_GEN_CTRL_TX_FIFO_EN); |
group-onsemi | 0:098463de4c5d | 214 | spim->gen_ctrl = ctrl_save; |
group-onsemi | 0:098463de4c5d | 215 | } |
group-onsemi | 0:098463de4c5d | 216 | |
group-onsemi | 0:098463de4c5d | 217 | /** |
group-onsemi | 0:098463de4c5d | 218 | * @brief TX FIFO availability. |
group-onsemi | 0:098463de4c5d | 219 | * @param spim Pointer to UART regs. |
group-onsemi | 0:098463de4c5d | 220 | * @returns Number of empty bytes available in write FIFO. |
group-onsemi | 0:098463de4c5d | 221 | */ |
group-onsemi | 0:098463de4c5d | 222 | __STATIC_INLINE unsigned SPIM_NumWriteAvail(mxc_spim_regs_t *spim) |
group-onsemi | 0:098463de4c5d | 223 | { |
group-onsemi | 0:098463de4c5d | 224 | return (MXC_CFG_SPIM_FIFO_DEPTH - ((spim->fifo_ctrl & |
group-onsemi | 0:098463de4c5d | 225 | MXC_F_SPIM_FIFO_CTRL_TX_FIFO_USED) >> MXC_F_SPIM_FIFO_CTRL_TX_FIFO_USED_POS)); |
group-onsemi | 0:098463de4c5d | 226 | } |
group-onsemi | 0:098463de4c5d | 227 | |
group-onsemi | 0:098463de4c5d | 228 | /** |
group-onsemi | 0:098463de4c5d | 229 | * @brief RX FIFO availability. |
group-onsemi | 0:098463de4c5d | 230 | * @param spim Pointer to UART regs. |
group-onsemi | 0:098463de4c5d | 231 | * @returns Number of bytes in read FIFO. |
group-onsemi | 0:098463de4c5d | 232 | */ |
group-onsemi | 0:098463de4c5d | 233 | __STATIC_INLINE unsigned SPIM_NumReadAvail(mxc_spim_regs_t *spim) |
group-onsemi | 0:098463de4c5d | 234 | { |
group-onsemi | 0:098463de4c5d | 235 | return ((spim->fifo_ctrl & MXC_F_SPIM_FIFO_CTRL_RX_FIFO_USED) >> |
group-onsemi | 0:098463de4c5d | 236 | MXC_F_SPIM_FIFO_CTRL_RX_FIFO_USED_POS); |
group-onsemi | 0:098463de4c5d | 237 | } |
group-onsemi | 0:098463de4c5d | 238 | |
group-onsemi | 0:098463de4c5d | 239 | /** |
group-onsemi | 0:098463de4c5d | 240 | * @brief Clear interrupt flags. |
group-onsemi | 0:098463de4c5d | 241 | * @param spim Pointer to SPIM regs. |
group-onsemi | 0:098463de4c5d | 242 | * @param mask Mask of interrupts to clear. |
group-onsemi | 0:098463de4c5d | 243 | */ |
group-onsemi | 0:098463de4c5d | 244 | __STATIC_INLINE void SPIM_ClearFlags(mxc_spim_regs_t *spim, uint32_t mask) |
group-onsemi | 0:098463de4c5d | 245 | { |
group-onsemi | 0:098463de4c5d | 246 | spim->intfl = mask; |
group-onsemi | 0:098463de4c5d | 247 | } |
group-onsemi | 0:098463de4c5d | 248 | |
group-onsemi | 0:098463de4c5d | 249 | /** |
group-onsemi | 0:098463de4c5d | 250 | * @brief Get interrupt flags. |
group-onsemi | 0:098463de4c5d | 251 | * @param spim Pointer to SPIM regs. |
group-onsemi | 0:098463de4c5d | 252 | * @returns Mask of active flags. |
group-onsemi | 0:098463de4c5d | 253 | */ |
group-onsemi | 0:098463de4c5d | 254 | __STATIC_INLINE unsigned SPIM_GetFlags(mxc_spim_regs_t *spim) |
group-onsemi | 0:098463de4c5d | 255 | { |
group-onsemi | 0:098463de4c5d | 256 | return (spim->intfl); |
group-onsemi | 0:098463de4c5d | 257 | } |
group-onsemi | 0:098463de4c5d | 258 | |
group-onsemi | 0:098463de4c5d | 259 | #ifdef __cplusplus |
group-onsemi | 0:098463de4c5d | 260 | } |
group-onsemi | 0:098463de4c5d | 261 | #endif |
group-onsemi | 0:098463de4c5d | 262 | |
group-onsemi | 0:098463de4c5d | 263 | #endif /* _SPIM_H_ */ |