mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Revision:
563:536c9fb088a0
Parent:
552:a1b9575155a3
Child:
564:24a7119bd73a
--- a/api/SPI.h	Tue Jun 09 15:30:08 2015 +0100
+++ b/api/SPI.h	Wed Jun 10 10:00:08 2015 +0100
@@ -123,7 +123,7 @@
      * @param event     The logical OR of events to modify
      * @return Zero if the transfer has started, or -1 if SPI peripheral is busy
      */
-    virtual int transfer(uint8_t *tx_buffer, int tx_length, uint8_t *rx_buffer, int rx_length, const event_callback_t& callback, int event = SPI_EVENT_COMPLETE) {
+    virtual int transfer(const uint8_t *tx_buffer, int tx_length, uint8_t *rx_buffer, int rx_length, const event_callback_t& callback, int event = SPI_EVENT_COMPLETE) {
         return transfer(tx_buffer, tx_length, rx_buffer, rx_length, 8, callback, event);
     }
 
@@ -139,7 +139,7 @@
      * @param event     The logical OR of events to modify
      * @return Zero if the transfer has started, or -1 if SPI peripheral is busy
      */
-    virtual int transfer(uint16_t *tx_buffer, int tx_length, uint16_t *rx_buffer, int rx_length, const event_callback_t& callback, int event = SPI_EVENT_COMPLETE) {
+    virtual int transfer(const uint16_t *tx_buffer, int tx_length, uint16_t *rx_buffer, int rx_length, const event_callback_t& callback, int event = SPI_EVENT_COMPLETE) {
         return transfer(tx_buffer, tx_length, rx_buffer, rx_length, 16, callback, event);
     }
 
@@ -155,7 +155,7 @@
      * @param event     The logical OR of events to modify
      * @return Zero if the transfer has started, or -1 if SPI peripheral is busy
      */
-    virtual int transfer(uint32_t *tx_buffer, int tx_length, uint32_t *rx_buffer, int rx_length, const event_callback_t& callback, int event = SPI_EVENT_COMPLETE)  {
+    virtual int transfer(const uint32_t *tx_buffer, int tx_length, uint32_t *rx_buffer, int rx_length, const event_callback_t& callback, int event = SPI_EVENT_COMPLETE)  {
         return transfer((void *)tx_buffer, tx_length, (void *)rx_buffer, rx_length, 32, callback, event);
     }
 
@@ -197,7 +197,7 @@
      * @param event     The logical OR of events to modify
      * @return Zero if the transfer has started or was added to the queue, or -1 if SPI peripheral is busy/buffer is full
     */
-    int transfer(void *tx_buffer, int tx_length, void *rx_buffer, int rx_length, unsigned char bit_width, const event_callback_t& callback, int event);
+    int transfer(const void *tx_buffer, int tx_length, void *rx_buffer, int rx_length, unsigned char bit_width, const event_callback_t& callback, int event);
 
     /**
      *
@@ -212,7 +212,7 @@
      * @param event     The logical OR of events to modify
      * @return Zero if a transfer was added to the queue, or -1 if the queue is full
     */
-    int queue_transfer(void *tx_buffer, int tx_length, void *rx_buffer, int rx_length, unsigned char bit_width, const event_callback_t& callback, int event);
+    int queue_transfer(const void *tx_buffer, int tx_length, void *rx_buffer, int rx_length, unsigned char bit_width, const event_callback_t& callback, int event);
 
     /** Configures a callback, spi peripheral and initiate a new transfer
      *
@@ -226,7 +226,7 @@
      * @param callback  The event callback function
      * @param event     The logical OR of events to modify
     */
-    void start_transfer(void *tx_buffer, int tx_length, void *rx_buffer, int rx_length, unsigned char bit_width, const event_callback_t& callback, int event);
+    void start_transfer(const void *tx_buffer, int tx_length, void *rx_buffer, int rx_length, unsigned char bit_width, const event_callback_t& callback, int event);
 
 #if TRANSACTION_QUEUE_SIZE_SPI