Jelajahi Sumber

CMSIS-Driver SPI: removed Simplex Mode (deprecated)

Robert Rostohar 5 tahun lalu
induk
melakukan
ac75292d6b

+ 2 - 12
CMSIS/DoxyGen/Driver/src/Driver_SPI.c

@@ -395,22 +395,16 @@ The parameter \em arg provides (depending on the parameter \em control) addition
     <th> Description          
 	</th></tr>
 <tr><td> \ref ARM_SPI_MODE_INACTIVE       </td>
-    <td rowspan="5" style="text-align:right"> 0..7   </td>
-    <td rowspan="5"> \anchor spi_mode_tab Mode Controls    </td>
+    <td rowspan="3" style="text-align:right"> 0..7   </td>
+    <td rowspan="3"> \anchor spi_mode_tab Mode Controls    </td>
     <td> Set SPI to inactive. 
 	</td></tr>
 <tr><td> \ref ARM_SPI_MODE_MASTER         </td>
     <td> Set the SPI Master (Output on MOSI, and the Input on MISO); \em arg = Bus Speed in \token{bps} 
 	</td></tr>
-<tr><td> \ref ARM_SPI_MODE_MASTER_SIMPLEX </td>
-    <td> Set the SPI Master (Output and Input on MOSI); \em arg = Bus Speed in \token{bps}              
-	</td></tr>
 <tr><td> \ref ARM_SPI_MODE_SLAVE          </td>
     <td> Set the SPI Slave  (Output on MISO, and the Input on MOSI)                                     
 	</td></tr>
-<tr><td> \ref ARM_SPI_MODE_SLAVE_SIMPLEX  </td>
-    <td> Set the SPI Slave  (Output and Input on MISO)                                                  
-	</td></tr> 
 <tr><td> \ref ARM_SPI_CPOL0_CPHA0  (default)  </td>
     <td rowspan="6" style="text-align:right"> 8..11 </td>
     <td rowspan="6"> Clock Polarity <br> (Frame Format) </td><td> CPOL=\token{0} and CPHA=\token{0}: Clock Polarity 0, Clock Phase 0 </td>
@@ -606,10 +600,6 @@ Refer to the \ref ARM_SPI_Control function for further details.
 \sa ARM_SPI_Control
 \def ARM_SPI_MODE_SLAVE
 \sa ARM_SPI_Control
-\def ARM_SPI_MODE_MASTER_SIMPLEX
-\sa ARM_SPI_Control
-\def ARM_SPI_MODE_SLAVE_SIMPLEX
-\sa ARM_SPI_Control
 @}
 */
 

+ 2 - 6
CMSIS/Driver/DriverTemplates/Driver_SPI.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018 Arm Limited. All rights reserved.
+ * Copyright (c) 2013-2020 Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -28,7 +28,7 @@ static const ARM_DRIVER_VERSION DriverVersion = {
 
 /* Driver Capabilities */
 static const ARM_SPI_CAPABILITIES DriverCapabilities = {
-    1, /* Simplex Mode (Master and Slave) */
+    0, /* Reserved (must be zero) */
     1, /* TI Synchronous Serial Interface */
     1, /* Microwire Interface */
     0  /* Signal Mode Fault event: \ref ARM_SPI_EVENT_MODE_FAULT */
@@ -104,10 +104,6 @@ int32_t ARM_SPI_Control(uint32_t control, uint32_t arg)
     case ARM_SPI_MODE_SLAVE:                // SPI Slave  (Output on MISO, Input on MOSI)
         break;
 
-    case ARM_SPI_MODE_MASTER_SIMPLEX:       // SPI Master (Output/Input on MOSI); arg = Bus Speed in bps
-    case ARM_SPI_MODE_SLAVE_SIMPLEX:        // SPI Slave  (Output/Input on MISO)
-        return ARM_SPI_ERROR_MODE;
-
     case ARM_SPI_SET_BUS_SPEED:             // Set Bus Speed in bps; arg = value
         break;
 

+ 5 - 4
CMSIS/Driver/Include/Driver_SPI.h

@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  *
- * $Date:        24. January 2020
+ * $Date:        27. March 2020
  * $Revision:    V2.3
  *
  * Project:      SPI (Serial Peripheral Interface) Driver definitions
@@ -23,6 +23,7 @@
 
 /* History:
  *  Version 2.3
+ *    Removed Simplex Mode (deprecated)
  *    Removed volatile from ARM_SPI_STATUS
  *  Version 2.2
  *    ARM_SPI_STATUS made volatile
@@ -68,8 +69,8 @@ extern "C"
 #define ARM_SPI_MODE_INACTIVE           (0x00UL << ARM_SPI_CONTROL_Pos)     ///< SPI Inactive
 #define ARM_SPI_MODE_MASTER             (0x01UL << ARM_SPI_CONTROL_Pos)     ///< SPI Master (Output on MOSI, Input on MISO); arg = Bus Speed in bps
 #define ARM_SPI_MODE_SLAVE              (0x02UL << ARM_SPI_CONTROL_Pos)     ///< SPI Slave  (Output on MISO, Input on MOSI)
-#define ARM_SPI_MODE_MASTER_SIMPLEX     (0x03UL << ARM_SPI_CONTROL_Pos)     ///< SPI Master (Output/Input on MOSI); arg = Bus Speed in bps
-#define ARM_SPI_MODE_SLAVE_SIMPLEX      (0x04UL << ARM_SPI_CONTROL_Pos)     ///< SPI Slave  (Output/Input on MISO)
+#define ARM_SPI_MODE_MASTER_SIMPLEX     (0x03UL << ARM_SPI_CONTROL_Pos)     ///< SPI Master (Output/Input on MOSI); arg = Bus Speed in bps @deprecated Simplex Mode has been removed
+#define ARM_SPI_MODE_SLAVE_SIMPLEX      (0x04UL << ARM_SPI_CONTROL_Pos)     ///< SPI Slave  (Output/Input on MISO) @deprecated Simplex Mode has been removed
 
 /*----- SPI Control Codes: Mode Parameters: Frame Format -----*/
 #define ARM_SPI_FRAME_FORMAT_Pos         8
@@ -215,7 +216,7 @@ typedef void (*ARM_SPI_SignalEvent_t) (uint32_t event);  ///< Pointer to \ref AR
 \brief SPI Driver Capabilities.
 */
 typedef struct _ARM_SPI_CAPABILITIES {
-  uint32_t simplex          : 1;        ///< supports Simplex Mode (Master and Slave)
+  uint32_t simplex          : 1;        ///< supports Simplex Mode (Master and Slave) @deprecated Reserved (must be zero)
   uint32_t ti_ssi           : 1;        ///< supports TI Synchronous Serial Interface
   uint32_t microwire        : 1;        ///< supports Microwire Interface
   uint32_t event_mode_fault : 1;        ///< Signal Mode Fault event: \ref ARM_SPI_EVENT_MODE_FAULT