mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			typos
							parent
							
								
									24a3acd647
								
							
						
					
					
						commit
						c4f10aafee
					
				| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
#define THE_ANSWER 42
 | 
			
		||||
 | 
			
		||||
// Tests for static asserts in different contexts
 | 
			
		||||
// multiple asserts are used to garuntee no conflicts occur in generated labels
 | 
			
		||||
// multiple asserts are used to guarantee no conflicts occur in generated labels
 | 
			
		||||
 | 
			
		||||
// Test for static asserts in global context
 | 
			
		||||
MBED_STATIC_ASSERT(sizeof(int) >= sizeof(char),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
#define THE_ANSWER 42
 | 
			
		||||
 | 
			
		||||
// Tests for static asserts in different contexts
 | 
			
		||||
// multiple asserts are used to garuntee no conflicts occur in generated labels
 | 
			
		||||
// multiple asserts are used to guarantee no conflicts occur in generated labels
 | 
			
		||||
 | 
			
		||||
// Test for static asserts in global context
 | 
			
		||||
MBED_STATIC_ASSERT(sizeof(int) >= sizeof(char),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,7 +34,7 @@ class UDPEchoClientHandler(BaseRequestHandler):
 | 
			
		|||
        data, sock = self.request
 | 
			
		||||
        pattern = [ord(d) << 4 for d in data]
 | 
			
		||||
 | 
			
		||||
        # Each byte in request indicates size of packet to recieve
 | 
			
		||||
        # Each byte in request indicates size of packet to receive
 | 
			
		||||
        # Each packet size is shifted over by 4 to fit in a byte, which
 | 
			
		||||
        # avoids any issues with endianess or decoding
 | 
			
		||||
        for packet in pattern:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -226,7 +226,7 @@ void test_tcp_packet_pressure()
 | 
			
		|||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Verify recieved data
 | 
			
		||||
            // Verify received data
 | 
			
		||||
            while (rx_count < size) {
 | 
			
		||||
                int rd = sock.recv(buffer, buffer_size);
 | 
			
		||||
                TEST_ASSERT(rd > 0 || rd == NSAPI_ERROR_WOULD_BLOCK);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -232,7 +232,7 @@ public:
 | 
			
		|||
                    }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                // Verify recieved data
 | 
			
		||||
                // Verify received data
 | 
			
		||||
                while (rx_count < size) {
 | 
			
		||||
                    int rd = sock.recv(buffer, buffer_size);
 | 
			
		||||
                    TEST_ASSERT(rd > 0 || rd == NSAPI_ERROR_WOULD_BLOCK);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -222,7 +222,7 @@ void test_udp_packet_pressure()
 | 
			
		|||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Prioritize recieving over sending packets to avoid flooding
 | 
			
		||||
            // Prioritize receiving over sending packets to avoid flooding
 | 
			
		||||
            // the network while handling erronous packets
 | 
			
		||||
            while (rx_count < size) {
 | 
			
		||||
                int rd = sock.recvfrom(NULL, buffer, buffer_size);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -229,7 +229,7 @@ public:
 | 
			
		|||
                    }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                // Prioritize recieving over sending packets to avoid flooding
 | 
			
		||||
                // Prioritize receiving over sending packets to avoid flooding
 | 
			
		||||
                // the network while handling erronous packets
 | 
			
		||||
                while (rx_count < size) {
 | 
			
		||||
                    int rd = sock.recvfrom(NULL, buffer, buffer_size);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -98,7 +98,7 @@ public:
 | 
			
		|||
     */
 | 
			
		||||
    int send();
 | 
			
		||||
 | 
			
		||||
    /** Recevies an arrived ethernet packet.
 | 
			
		||||
    /** Receives an arrived ethernet packet.
 | 
			
		||||
     *
 | 
			
		||||
     *  Receiving an ethernet packet will drop the last received ethernet packet
 | 
			
		||||
     *  and make a new ethernet packet ready to read.
 | 
			
		||||
| 
						 | 
				
			
			@ -110,7 +110,7 @@ public:
 | 
			
		|||
     */
 | 
			
		||||
    int receive();
 | 
			
		||||
 | 
			
		||||
    /** Read from an recevied ethernet packet.
 | 
			
		||||
    /** Read from an received ethernet packet.
 | 
			
		||||
     *
 | 
			
		||||
     *  After receive returned a number bigger than 0 it is
 | 
			
		||||
     *  possible to read bytes from this packet.
 | 
			
		||||
| 
						 | 
				
			
			@ -131,11 +131,11 @@ public:
 | 
			
		|||
     */
 | 
			
		||||
    void address(char *mac);
 | 
			
		||||
 | 
			
		||||
    /** Returns if an ethernet link is pressent or not. It takes a wile after Ethernet initializion to show up.
 | 
			
		||||
    /** Returns if an ethernet link is present or not. It takes a while after Ethernet initialization to show up.
 | 
			
		||||
     *
 | 
			
		||||
     *  @returns
 | 
			
		||||
     *   0 if no ethernet link is pressent,
 | 
			
		||||
     *   1 if an ethernet link is pressent.
 | 
			
		||||
     *   0 if no ethernet link is present,
 | 
			
		||||
     *   1 if an ethernet link is present.
 | 
			
		||||
     *
 | 
			
		||||
     * Example:
 | 
			
		||||
     * @code
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -81,7 +81,7 @@ int I2C::write(int data) {
 | 
			
		|||
    return ret;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// read - Master Reciever Mode
 | 
			
		||||
// read - Master Receiver Mode
 | 
			
		||||
int I2C::read(int address, char* data, int length, bool repeated) {
 | 
			
		||||
    lock();
 | 
			
		||||
    aquire();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -159,9 +159,9 @@ public:
 | 
			
		|||
 | 
			
		||||
    /** Start non-blocking I2C transfer.
 | 
			
		||||
     *
 | 
			
		||||
     * This function locks the deep sleep until any event has occured
 | 
			
		||||
     * This function locks the deep sleep until any event has occurred
 | 
			
		||||
     * 
 | 
			
		||||
     * @param address   8/10 bit I2c slave address
 | 
			
		||||
     * @param address   8/10 bit I2C slave address
 | 
			
		||||
     * @param tx_buffer The TX buffer with data to be transfered
 | 
			
		||||
     * @param tx_length The length of TX buffer in bytes
 | 
			
		||||
     * @param rx_buffer The RX buffer which is used for received data
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,7 +68,7 @@ public:
 | 
			
		|||
     *
 | 
			
		||||
     * @param c The char to write
 | 
			
		||||
     *
 | 
			
		||||
     * @returns The written char or -1 if an error occured
 | 
			
		||||
     * @returns The written char or -1 if an error occurred
 | 
			
		||||
     */
 | 
			
		||||
    int putc(int c);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,8 +49,8 @@ void SPI::format(int bits, int mode) {
 | 
			
		|||
    lock();
 | 
			
		||||
    _bits = bits;
 | 
			
		||||
    _mode = mode;
 | 
			
		||||
    // If changing format while you are the owner than just
 | 
			
		||||
    // update format, but if owner is changed than even frequency should be
 | 
			
		||||
    // If changing format while you are the owner then just
 | 
			
		||||
    // update format, but if owner is changed then even frequency should be
 | 
			
		||||
    // updated which is done by acquire.
 | 
			
		||||
    if (_owner == this) {
 | 
			
		||||
        spi_format(&_spi, _bits, _mode, 0);
 | 
			
		||||
| 
						 | 
				
			
			@ -63,8 +63,8 @@ void SPI::format(int bits, int mode) {
 | 
			
		|||
void SPI::frequency(int hz) {
 | 
			
		||||
    lock();
 | 
			
		||||
    _hz = hz;
 | 
			
		||||
    // If changing format while you are the owner than just
 | 
			
		||||
    // update frequency, but if owner is changed than even frequency should be
 | 
			
		||||
    // If changing format while you are the owner then just
 | 
			
		||||
    // update frequency, but if owner is changed then even frequency should be
 | 
			
		||||
    // updated which is done by acquire.
 | 
			
		||||
    if (_owner == this) {
 | 
			
		||||
        spi_frequency(&_spi, _hz);
 | 
			
		||||
| 
						 | 
				
			
			@ -77,7 +77,7 @@ void SPI::frequency(int hz) {
 | 
			
		|||
SPI* SPI::_owner = NULL;
 | 
			
		||||
SingletonPtr<PlatformMutex> SPI::_mutex;
 | 
			
		||||
 | 
			
		||||
// ignore the fact there are multiple physical spis, and always update if it wasnt us last
 | 
			
		||||
// ignore the fact there are multiple physical spis, and always update if it wasn't us last
 | 
			
		||||
void SPI::aquire() {
 | 
			
		||||
    lock();
 | 
			
		||||
     if (_owner != this) {
 | 
			
		||||
| 
						 | 
				
			
			@ -252,7 +252,7 @@ void SPI::irq_handler_asynch(void)
 | 
			
		|||
    }
 | 
			
		||||
#if TRANSACTION_QUEUE_SIZE_SPI
 | 
			
		||||
    if (event & (SPI_EVENT_ALL | SPI_EVENT_INTERNAL_TRANSFER_COMPLETE)) {
 | 
			
		||||
        // SPI peripheral is free (event happend), dequeue transaction
 | 
			
		||||
        // SPI peripheral is free (event happened), dequeue transaction
 | 
			
		||||
        dequeue_transaction();
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -79,7 +79,7 @@ public:
 | 
			
		|||
 | 
			
		||||
    /** Create a SPI master connected to the specified pins
 | 
			
		||||
     *
 | 
			
		||||
     *  mosi or miso can be specfied as NC if not used
 | 
			
		||||
     *  mosi or miso can be specified as NC if not used
 | 
			
		||||
     *
 | 
			
		||||
     *  @param mosi SPI Master Out, Slave In pin
 | 
			
		||||
     *  @param miso SPI Master In, Slave Out pin
 | 
			
		||||
| 
						 | 
				
			
			@ -121,7 +121,7 @@ public:
 | 
			
		|||
 | 
			
		||||
    /** Write to the SPI Slave and obtain the response
 | 
			
		||||
     *
 | 
			
		||||
     *  The total number of bytes sent and recieved will be the maximum of
 | 
			
		||||
     *  The total number of bytes sent and received will be the maximum of
 | 
			
		||||
     *  tx_length and rx_length. The bytes written will be padded with the
 | 
			
		||||
     *  value 0xff.
 | 
			
		||||
     *
 | 
			
		||||
| 
						 | 
				
			
			@ -156,7 +156,7 @@ public:
 | 
			
		|||
 | 
			
		||||
    /** Start non-blocking SPI transfer using 8bit buffers.
 | 
			
		||||
     *
 | 
			
		||||
     * This function locks the deep sleep until any event has occured
 | 
			
		||||
     * This function locks the deep sleep until any event has occurred
 | 
			
		||||
     * 
 | 
			
		||||
     * @param tx_buffer The TX buffer with data to be transfered. If NULL is passed,
 | 
			
		||||
     *                  the default SPI value is sent
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,7 +59,7 @@ public:
 | 
			
		|||
 | 
			
		||||
    /** Create a SPI slave connected to the specified pins
 | 
			
		||||
     *
 | 
			
		||||
     *  mosi or miso can be specfied as NC if not used
 | 
			
		||||
     *  mosi or miso can be specified as NC if not used
 | 
			
		||||
     *
 | 
			
		||||
     *  @param mosi SPI Master Out, Slave In pin
 | 
			
		||||
     *  @param miso SPI Master In, Slave Out pin
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -167,7 +167,7 @@ public:
 | 
			
		|||
 | 
			
		||||
    /** Begin asynchronous write using 8bit buffer. The completition invokes registered TX event callback
 | 
			
		||||
     *
 | 
			
		||||
     *  This function locks the deep sleep until any event has occured
 | 
			
		||||
     *  This function locks the deep sleep until any event has occurred
 | 
			
		||||
     * 
 | 
			
		||||
     *  @param buffer   The buffer where received data will be stored
 | 
			
		||||
     *  @param length   The buffer length in bytes
 | 
			
		||||
| 
						 | 
				
			
			@ -178,7 +178,7 @@ public:
 | 
			
		|||
 | 
			
		||||
    /** Begin asynchronous write using 16bit buffer. The completition invokes registered TX event callback
 | 
			
		||||
     *
 | 
			
		||||
     *  This function locks the deep sleep until any event has occured
 | 
			
		||||
     *  This function locks the deep sleep until any event has occurred
 | 
			
		||||
     * 
 | 
			
		||||
     *  @param buffer   The buffer where received data will be stored
 | 
			
		||||
     *  @param length   The buffer length in bytes
 | 
			
		||||
| 
						 | 
				
			
			@ -193,7 +193,7 @@ public:
 | 
			
		|||
 | 
			
		||||
    /** Begin asynchronous reading using 8bit buffer. The completition invokes registred RX event callback.
 | 
			
		||||
     *
 | 
			
		||||
     *  This function locks the deep sleep until any event has occured
 | 
			
		||||
     *  This function locks the deep sleep until any event has occurred
 | 
			
		||||
     * 
 | 
			
		||||
     *  @param buffer     The buffer where received data will be stored
 | 
			
		||||
     *  @param length     The buffer length in bytes
 | 
			
		||||
| 
						 | 
				
			
			@ -205,7 +205,7 @@ public:
 | 
			
		|||
 | 
			
		||||
    /** Begin asynchronous reading using 16bit buffer. The completition invokes registred RX event callback.
 | 
			
		||||
     *
 | 
			
		||||
     *  This function locks the deep sleep until any event has occured
 | 
			
		||||
     *  This function locks the deep sleep until any event has occurred
 | 
			
		||||
     * 
 | 
			
		||||
     *  @param buffer     The buffer where received data will be stored
 | 
			
		||||
     *  @param length     The buffer length in bytes
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -172,7 +172,7 @@ public:
 | 
			
		|||
     *  The cancel function is irq safe.
 | 
			
		||||
     *
 | 
			
		||||
     *  If called while the event queue's dispatch loop is active, the cancel
 | 
			
		||||
     *  function does not garuntee that the event will not execute after it
 | 
			
		||||
     *  function does not guarantee that the event will not execute after it
 | 
			
		||||
     *  returns, as the event may have already begun executing.
 | 
			
		||||
     */
 | 
			
		||||
    void cancel() const {
 | 
			
		||||
| 
						 | 
				
			
			@ -590,7 +590,7 @@ public:
 | 
			
		|||
     *  The cancel function is irq safe.
 | 
			
		||||
     *
 | 
			
		||||
     *  If called while the event queue's dispatch loop is active, the cancel
 | 
			
		||||
     *  function does not garuntee that the event will not execute after it
 | 
			
		||||
     *  function does not guarantee that the event will not execute after it
 | 
			
		||||
     *  returns, as the event may have already begun executing.
 | 
			
		||||
     */
 | 
			
		||||
    void cancel() const {
 | 
			
		||||
| 
						 | 
				
			
			@ -1008,7 +1008,7 @@ public:
 | 
			
		|||
     *  The cancel function is irq safe.
 | 
			
		||||
     *
 | 
			
		||||
     *  If called while the event queue's dispatch loop is active, the cancel
 | 
			
		||||
     *  function does not garuntee that the event will not execute after it
 | 
			
		||||
     *  function does not guarantee that the event will not execute after it
 | 
			
		||||
     *  returns, as the event may have already begun executing.
 | 
			
		||||
     */
 | 
			
		||||
    void cancel() const {
 | 
			
		||||
| 
						 | 
				
			
			@ -1426,7 +1426,7 @@ public:
 | 
			
		|||
     *  The cancel function is irq safe.
 | 
			
		||||
     *
 | 
			
		||||
     *  If called while the event queue's dispatch loop is active, the cancel
 | 
			
		||||
     *  function does not garuntee that the event will not execute after it
 | 
			
		||||
     *  function does not guarantee that the event will not execute after it
 | 
			
		||||
     *  returns, as the event may have already begun executing.
 | 
			
		||||
     */
 | 
			
		||||
    void cancel() const {
 | 
			
		||||
| 
						 | 
				
			
			@ -1844,7 +1844,7 @@ public:
 | 
			
		|||
     *  The cancel function is irq safe.
 | 
			
		||||
     *
 | 
			
		||||
     *  If called while the event queue's dispatch loop is active, the cancel
 | 
			
		||||
     *  function does not garuntee that the event will not execute after it
 | 
			
		||||
     *  function does not guarantee that the event will not execute after it
 | 
			
		||||
     *  returns, as the event may have already begun executing.
 | 
			
		||||
     */
 | 
			
		||||
    void cancel() const {
 | 
			
		||||
| 
						 | 
				
			
			@ -2262,7 +2262,7 @@ public:
 | 
			
		|||
     *  The cancel function is irq safe.
 | 
			
		||||
     *
 | 
			
		||||
     *  If called while the event queue's dispatch loop is active, the cancel
 | 
			
		||||
     *  function does not garuntee that the event will not execute after it
 | 
			
		||||
     *  function does not guarantee that the event will not execute after it
 | 
			
		||||
     *  returns, as the event may have already begun executing.
 | 
			
		||||
     */
 | 
			
		||||
    void cancel() const {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -117,7 +117,7 @@ public:
 | 
			
		|||
     *  The cancel function is irq safe.
 | 
			
		||||
     *
 | 
			
		||||
     *  If called while the event queue's dispatch loop is active, the cancel
 | 
			
		||||
     *  function does not garuntee that the event will not execute after it
 | 
			
		||||
     *  function does not guarantee that the event will not execute after it
 | 
			
		||||
     *  returns, as the event may have already begun executing.
 | 
			
		||||
     *
 | 
			
		||||
     *  @param id       Unique id of the event
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -113,7 +113,7 @@ queue.dispatch();
 | 
			
		|||
 | 
			
		||||
// Events can also pass arguments to the underlying callback when both
 | 
			
		||||
// initially constructed and posted.
 | 
			
		||||
Event<void(int, int)> event(&queue, printf, "recieved %d and %d\n");
 | 
			
		||||
Event<void(int, int)> event(&queue, printf, "received %d and %d\n");
 | 
			
		||||
 | 
			
		||||
// Events can be posted multiple times and enqueue gracefully until
 | 
			
		||||
// the dispatch function is called.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -246,7 +246,7 @@ public:
 | 
			
		|||
 | 
			
		||||
private:
 | 
			
		||||
    // this class is not a value type.
 | 
			
		||||
    // prohibit copy construction and copy assignement
 | 
			
		||||
    // prohibit copy construction and copy assignment
 | 
			
		||||
    BLEInstanceBase(const BLEInstanceBase&);
 | 
			
		||||
    BLEInstanceBase &operator=(const BLEInstanceBase&);
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,7 +75,7 @@ struct AttClient {
 | 
			
		|||
     * The mtu choosen for the connection is the minimum of the client Rx mtu
 | 
			
		||||
     * and server Rx mtu values.
 | 
			
		||||
     *
 | 
			
		||||
     * If an error occured then the mtu used remains the default value.
 | 
			
		||||
     * If an error occurred then the mtu used remains the default value.
 | 
			
		||||
     *
 | 
			
		||||
     * @param connection The handle of the connection to send this request to.
 | 
			
		||||
     *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,7 +75,7 @@ struct GapEvent {
 | 
			
		|||
protected:
 | 
			
		||||
    GapEvent(GapEventType type) : type(type) { }
 | 
			
		||||
 | 
			
		||||
    // Disable copy construction and copy assignement operations.
 | 
			
		||||
    // Disable copy construction and copy assignment operations.
 | 
			
		||||
    GapEvent(const GapEvent&);
 | 
			
		||||
    GapEvent& operator=(const GapEvent&);
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -63,7 +63,7 @@ typedef struct
 | 
			
		|||
/*! WSF buffer diagnostics - buffer allocation failure */
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
  uint8_t    taskId;               /*! Task handler ID where failure occured */
 | 
			
		||||
  uint8_t    taskId;               /*! Task handler ID where failure occurred */
 | 
			
		||||
  uint16_t   len;                  /*! Length of buffer being allocated */
 | 
			
		||||
} wsfBufDiagAllocFail_t;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,7 +57,7 @@ void hal_sleep(void)
 | 
			
		|||
            return;
 | 
			
		||||
        } else {
 | 
			
		||||
            // next event will wakeup the CPU
 | 
			
		||||
            // If an interrupt occured between the test of SCB->ICSR and this
 | 
			
		||||
            // If an interrupt occurred between the test of SCB->ICSR and this
 | 
			
		||||
            // instruction, WFE will just not put the CPU to sleep
 | 
			
		||||
            __WFE();
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -359,7 +359,7 @@ bool is_duplicate_bonding_data(pm_peer_data_bonding_t const * p_bonding_data1,
 | 
			
		|||
 | 
			
		||||
/**@brief Event handler for events from the peer_database module.
 | 
			
		||||
 *
 | 
			
		||||
 * @param[in]  p_event The event that has happend with peer id and flags.
 | 
			
		||||
 * @param[in]  p_event The event that has happened with peer id and flags.
 | 
			
		||||
 */
 | 
			
		||||
static void pdb_evt_handler(pdb_evt_t const * p_event)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -152,10 +152,10 @@ typedef enum
 | 
			
		|||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
    dfu_update_status_code_t status_code;                                                               /**< Device Firmware Update status. */
 | 
			
		||||
    uint16_t                 app_crc;                                                                   /**< CRC of the recieved application. */
 | 
			
		||||
    uint32_t                 sd_size;                                                                   /**< Size of the recieved SoftDevice. */
 | 
			
		||||
    uint32_t                 bl_size;                                                                   /**< Size of the recieved BootLoader. */
 | 
			
		||||
    uint32_t                 app_size;                                                                  /**< Size of the recieved Application. */
 | 
			
		||||
    uint16_t                 app_crc;                                                                   /**< CRC of the received application. */
 | 
			
		||||
    uint32_t                 sd_size;                                                                   /**< Size of the received SoftDevice. */
 | 
			
		||||
    uint32_t                 bl_size;                                                                   /**< Size of the received BootLoader. */
 | 
			
		||||
    uint32_t                 app_size;                                                                  /**< Size of the received Application. */
 | 
			
		||||
    uint32_t                 sd_image_start;                                                            /**< Location in flash where the received SoftDevice image is stored. */
 | 
			
		||||
} dfu_update_status_t;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -721,7 +721,7 @@ typedef struct
 | 
			
		|||
/**@brief GAP event structure. */
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
  uint16_t conn_handle;                                     /**< Connection Handle on which event occured. */
 | 
			
		||||
  uint16_t conn_handle;                                     /**< Connection Handle on which event occurred. */
 | 
			
		||||
  union                                                     /**< union alternative identified by evt_id in enclosing struct. */
 | 
			
		||||
  {
 | 
			
		||||
    ble_gap_evt_connected_t                   connected;                    /**< Connected Event Parameters. */
 | 
			
		||||
| 
						 | 
				
			
			@ -1153,7 +1153,7 @@ SVCALL(SD_BLE_GAP_DEVICE_NAME_GET, uint32_t, sd_ble_gap_device_name_get(uint8_t
 | 
			
		|||
 * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation.
 | 
			
		||||
 * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry.
 | 
			
		||||
 * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.
 | 
			
		||||
 * @retval ::NRF_ERROR_TIMEOUT A SMP timout has occured, and further SMP operations on this link is prohibited.
 | 
			
		||||
 * @retval ::NRF_ERROR_TIMEOUT A SMP timout has occurred, and further SMP operations on this link is prohibited.
 | 
			
		||||
 */
 | 
			
		||||
SVCALL(SD_BLE_GAP_AUTHENTICATE, uint32_t, sd_ble_gap_authenticate(uint16_t conn_handle, ble_gap_sec_params_t const *p_sec_params));
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -239,7 +239,7 @@ typedef struct
 | 
			
		|||
/**@brief GATTC event structure. */
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
  uint16_t            conn_handle;                /**< Connection Handle on which event occured. */
 | 
			
		||||
  uint16_t            conn_handle;                /**< Connection Handle on which event occurred. */
 | 
			
		||||
  uint16_t            gatt_status;                /**< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES. */
 | 
			
		||||
  uint16_t            error_handle;               /**< In case of error: The handle causing the error. In all other cases @ref BLE_GATT_HANDLE_INVALID. */
 | 
			
		||||
  union
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -107,7 +107,7 @@ typedef struct
 | 
			
		|||
/**@brief L2CAP event callback event structure. */
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
  uint16_t conn_handle;                           /**< Connection Handle on which event occured. */
 | 
			
		||||
  uint16_t conn_handle;                           /**< Connection Handle on which event occurred. */
 | 
			
		||||
  union
 | 
			
		||||
  {
 | 
			
		||||
    ble_l2cap_evt_rx_t rx;                        /**< RX Event parameters. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -82,21 +82,21 @@ public:
 | 
			
		|||
    /** Get the local IP address
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Null-terminated representation of the local IP address
 | 
			
		||||
     *                  or null if no IP address has been recieved
 | 
			
		||||
     *                  or null if no IP address has been received
 | 
			
		||||
     */
 | 
			
		||||
    virtual const char *get_ip_address();
 | 
			
		||||
 | 
			
		||||
    /** Get the local network mask
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Null-terminated representation of the local network mask 
 | 
			
		||||
     *                  or null if no network mask has been recieved
 | 
			
		||||
     *                  or null if no network mask has been received
 | 
			
		||||
     */
 | 
			
		||||
    virtual const char *get_netmask();
 | 
			
		||||
 | 
			
		||||
    /** Get the local gateways
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Null-terminated representation of the local gateway
 | 
			
		||||
     *                  or null if no network mask has been recieved
 | 
			
		||||
     *                  or null if no network mask has been received
 | 
			
		||||
     */
 | 
			
		||||
    virtual const char *get_gateway();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -249,7 +249,7 @@ extern "C"
 | 
			
		|||
#define EMAC_TSV0_PKT_DEFER      0x00000040  /**< Packet Deferred                   */
 | 
			
		||||
#define EMAC_TSV0_EXC_DEFER      0x00000080  /**< Excessive Packet Deferral         */
 | 
			
		||||
#define EMAC_TSV0_EXC_COLL       0x00000100  /**< Excessive Collision               */
 | 
			
		||||
#define EMAC_TSV0_LATE_COLL      0x00000200  /**< Late Collision Occured            */
 | 
			
		||||
#define EMAC_TSV0_LATE_COLL      0x00000200  /**< Late Collision Occurred           */
 | 
			
		||||
#define EMAC_TSV0_GIANT          0x00000400  /**< Giant Frame                       */
 | 
			
		||||
#define EMAC_TSV0_UNDERRUN       0x00000800  /**< Buffer Underrun                   */
 | 
			
		||||
#define EMAC_TSV0_BYTES          0x0FFFF000  /**< Total Bytes Transferred           */
 | 
			
		||||
| 
						 | 
				
			
			@ -373,7 +373,7 @@ extern "C"
 | 
			
		|||
#define EMAC_RINFO_OVERRUN       0x10000000  /**< Receive overrun                   */
 | 
			
		||||
#define EMAC_RINFO_NO_DESCR      0x20000000  /**< No new Descriptor available       */
 | 
			
		||||
#define EMAC_RINFO_LAST_FLAG     0x40000000  /**< Last Fragment in Frame            */
 | 
			
		||||
#define EMAC_RINFO_ERR           0x80000000  /**< Error Occured (OR of all errors)  */
 | 
			
		||||
#define EMAC_RINFO_ERR           0x80000000  /**< Error Occurred (OR of all errors) */
 | 
			
		||||
#define EMAC_RINFO_ERR_MASK     (EMAC_RINFO_FAIL_FILT | EMAC_RINFO_CRC_ERR   | EMAC_RINFO_SYM_ERR | \
 | 
			
		||||
EMAC_RINFO_LEN_ERR   | EMAC_RINFO_ALIGN_ERR | EMAC_RINFO_OVERRUN)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -395,10 +395,10 @@ EMAC_RINFO_LEN_ERR   | EMAC_RINFO_ALIGN_ERR | EMAC_RINFO_OVERRUN)
 | 
			
		|||
#define EMAC_TINFO_DEFER         0x02000000  /**< Packet Deferred (not an error)    */
 | 
			
		||||
#define EMAC_TINFO_EXCESS_DEF    0x04000000  /**< Excessive Deferral                */
 | 
			
		||||
#define EMAC_TINFO_EXCESS_COL    0x08000000  /**< Excessive Collision               */
 | 
			
		||||
#define EMAC_TINFO_LATE_COL      0x10000000  /**< Late Collision Occured            */
 | 
			
		||||
#define EMAC_TINFO_LATE_COL      0x10000000  /**< Late Collision Occurred           */
 | 
			
		||||
#define EMAC_TINFO_UNDERRUN      0x20000000  /**< Transmit Underrun                 */
 | 
			
		||||
#define EMAC_TINFO_NO_DESCR      0x40000000  /**< No new Descriptor available       */
 | 
			
		||||
#define EMAC_TINFO_ERR           0x80000000  /**< Error Occured (OR of all errors)  */
 | 
			
		||||
#define EMAC_TINFO_ERR           0x80000000  /**< Error Occurred (OR of all errors) */
 | 
			
		||||
 | 
			
		||||
#ifdef MCB_LPC_1768
 | 
			
		||||
/* DP83848C PHY definition ------------------------------------------------------------ */
 | 
			
		||||
| 
						 | 
				
			
			@ -417,7 +417,7 @@ EMAC_RINFO_LEN_ERR   | EMAC_RINFO_ALIGN_ERR | EMAC_RINFO_OVERRUN)
 | 
			
		|||
#define EMAC_PHY_REG_IDR1        0x02        /**< PHY Identifier 1                  */
 | 
			
		||||
#define EMAC_PHY_REG_IDR2        0x03        /**< PHY Identifier 2                  */
 | 
			
		||||
#define EMAC_PHY_REG_ANAR        0x04        /**< Auto-Negotiation Advertisement    */
 | 
			
		||||
#define EMAC_PHY_REG_ANLPAR      0x05        /**< Auto-Neg. Link Partner Abitily    */
 | 
			
		||||
#define EMAC_PHY_REG_ANLPAR      0x05        /**< Auto-Neg. Link Partner Ability    */
 | 
			
		||||
#define EMAC_PHY_REG_ANER        0x06        /**< Auto-Neg. Expansion Register      */
 | 
			
		||||
#define EMAC_PHY_REG_ANNPTR      0x07        /**< Auto-Neg. Next Page TX            */
 | 
			
		||||
#define EMAC_PHY_REG_LPNPA         0x08
 | 
			
		||||
| 
						 | 
				
			
			@ -504,7 +504,7 @@ EMAC_RINFO_LEN_ERR   | EMAC_RINFO_ALIGN_ERR | EMAC_RINFO_OVERRUN)
 | 
			
		|||
#define EMAC_PHY_REG_IDR1        0x02        /**< PHY Identifier 1                  */
 | 
			
		||||
#define EMAC_PHY_REG_IDR2        0x03        /**< PHY Identifier 2                  */
 | 
			
		||||
#define EMAC_PHY_REG_ANAR        0x04        /**< Auto-Negotiation Advertisement    */
 | 
			
		||||
#define EMAC_PHY_REG_ANLPAR      0x05        /**< Auto-Neg. Link Partner Abitily    */
 | 
			
		||||
#define EMAC_PHY_REG_ANLPAR      0x05        /**< Auto-Neg. Link Partner Ability    */
 | 
			
		||||
#define EMAC_PHY_REG_ANER        0x06        /**< Auto-Neg. Expansion Register      */
 | 
			
		||||
#define EMAC_PHY_REG_ANNPTR      0x07        /**< Auto-Neg. Next Page TX            */
 | 
			
		||||
#define EMAC_PHY_REG_LPNPA         0x08         /**< Link Partner Next Page Ability    */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3918,7 +3918,7 @@ HISTORY
 | 
			
		|||
  ++ Bug fixes:
 | 
			
		||||
 | 
			
		||||
  * Fixed pool pbuf memory leak in pbuf_alloc().
 | 
			
		||||
    Occured if not enough PBUF_POOL pbufs for a packet pbuf chain.
 | 
			
		||||
    Occurred if not enough PBUF_POOL pbufs for a packet pbuf chain.
 | 
			
		||||
    Reported by Savin Zlobec.
 | 
			
		||||
 | 
			
		||||
  * PBUF_POOL chains had their tot_len field not set for non-first
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1469,7 +1469,7 @@ snmp_complete_outbound_frame(struct snmp_request *request)
 | 
			
		|||
    if (request->error_status == SNMP_ERR_TOOBIG) {
 | 
			
		||||
      request->error_index = 0; /* defined by RFC 1157 */
 | 
			
		||||
    } else if (request->error_index == 0) {
 | 
			
		||||
      /* set index to varbind where error occured (if not already set before, e.g. during GetBulk processing) */
 | 
			
		||||
      /* set index to varbind where error occurred (if not already set before, e.g. during GetBulk processing) */
 | 
			
		||||
      request->error_index = request->inbound_varbind_enumerator.varbind_count;
 | 
			
		||||
    }
 | 
			
		||||
  } else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -191,7 +191,7 @@ send_data(void)
 | 
			
		|||
 | 
			
		||||
  ret = tftp_state.ctx->read(tftp_state.handle, &payload[2], TFTP_MAX_PAYLOAD_SIZE);
 | 
			
		||||
  if (ret < 0) {
 | 
			
		||||
    send_error(&tftp_state.addr, tftp_state.port, TFTP_ERROR_ACCESS_VIOLATION, "Error occured while reading the file.");
 | 
			
		||||
    send_error(&tftp_state.addr, tftp_state.port, TFTP_ERROR_ACCESS_VIOLATION, "Error occurred while reading the file.");
 | 
			
		||||
    close_handle();
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1744,7 +1744,7 @@ static int ipcp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree) {
 | 
			
		|||
	}
 | 
			
		||||
endswitch:
 | 
			
		||||
	if (orc == CONFACK &&		/* Good CI */
 | 
			
		||||
	    rc != CONFACK)		/*  but prior CI wasnt? */
 | 
			
		||||
	    rc != CONFACK)		/*  but prior CI wasn't? */
 | 
			
		||||
	    continue;			/* Don't send this one */
 | 
			
		||||
 | 
			
		||||
	if (orc == CONFNAK) {		/* Nak this CI? */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1011,7 +1011,7 @@ endswitch:
 | 
			
		|||
	IPV6CPDEBUG((" (%s)\n", CODENAME(orc)));
 | 
			
		||||
 | 
			
		||||
	if (orc == CONFACK &&		/* Good CI */
 | 
			
		||||
	    rc != CONFACK)		/*  but prior CI wasnt? */
 | 
			
		||||
	    rc != CONFACK)		/*  but prior CI wasn't? */
 | 
			
		||||
	    continue;			/* Don't send this one */
 | 
			
		||||
 | 
			
		||||
	if (orc == CONFNAK) {		/* Nak this CI? */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2232,7 +2232,7 @@ static int lcp_reqci(fsm *f, u_char *inp, int *lenp, int reject_if_disagree) {
 | 
			
		|||
 | 
			
		||||
endswitch:
 | 
			
		||||
	if (orc == CONFACK &&		/* Good CI */
 | 
			
		||||
	    rc != CONFACK)		/*  but prior CI wasnt? */
 | 
			
		||||
	    rc != CONFACK)		/*  but prior CI wasn't? */
 | 
			
		||||
	    continue;			/* Don't send this one */
 | 
			
		||||
 | 
			
		||||
	if (orc == CONFNAK) {		/* Nak this CI? */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -128,9 +128,9 @@ public:
 | 
			
		|||
     */
 | 
			
		||||
    virtual bd_size_t get_read_size() const = 0;
 | 
			
		||||
 | 
			
		||||
    /** Get the size of a programable block
 | 
			
		||||
    /** Get the size of a programmable block
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Size of a programable block in bytes
 | 
			
		||||
     *  @return         Size of a programmable block in bytes
 | 
			
		||||
     *  @note Must be a multiple of the read size
 | 
			
		||||
     */
 | 
			
		||||
    virtual bd_size_t get_program_size() const = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -128,9 +128,9 @@ public:
 | 
			
		|||
     */
 | 
			
		||||
    virtual bd_size_t get_read_size() const;
 | 
			
		||||
 | 
			
		||||
    /** Get the size of a programable block
 | 
			
		||||
    /** Get the size of a programmable block
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Size of a programable block in bytes
 | 
			
		||||
     *  @return         Size of a programmable block in bytes
 | 
			
		||||
     *  @note Must be a multiple of the read size
 | 
			
		||||
     */
 | 
			
		||||
    virtual bd_size_t get_program_size() const;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -118,9 +118,9 @@ public:
 | 
			
		|||
     */
 | 
			
		||||
    virtual bd_size_t get_read_size() const;
 | 
			
		||||
 | 
			
		||||
    /** Get the size of a programable block
 | 
			
		||||
    /** Get the size of a programmable block
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Size of a programable block in bytes
 | 
			
		||||
     *  @return         Size of a programmable block in bytes
 | 
			
		||||
     */
 | 
			
		||||
    virtual bd_size_t get_program_size() const;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -187,9 +187,9 @@ public:
 | 
			
		|||
     */
 | 
			
		||||
    virtual bd_size_t get_read_size() const;
 | 
			
		||||
 | 
			
		||||
    /** Get the size of a programable block
 | 
			
		||||
    /** Get the size of a programmable block
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Size of a programable block in bytes
 | 
			
		||||
     *  @return         Size of a programmable block in bytes
 | 
			
		||||
     *  @note Must be a multiple of the read size
 | 
			
		||||
     */
 | 
			
		||||
    virtual bd_size_t get_program_size() const;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -114,9 +114,9 @@ public:
 | 
			
		|||
     */
 | 
			
		||||
    virtual bd_size_t get_read_size() const;
 | 
			
		||||
 | 
			
		||||
    /** Get the size of a programable block
 | 
			
		||||
    /** Get the size of a programmable block
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Size of a programable block in bytes
 | 
			
		||||
     *  @return         Size of a programmable block in bytes
 | 
			
		||||
     *  @note Must be a multiple of the read size
 | 
			
		||||
     */
 | 
			
		||||
    virtual bd_size_t get_program_size() const;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -120,9 +120,9 @@ public:
 | 
			
		|||
     */
 | 
			
		||||
    virtual bd_size_t get_read_size() const;
 | 
			
		||||
 | 
			
		||||
    /** Get the size of a programable block
 | 
			
		||||
    /** Get the size of a programmable block
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Size of a programable block in bytes
 | 
			
		||||
     *  @return         Size of a programmable block in bytes
 | 
			
		||||
     *  @note Must be a multiple of the read size
 | 
			
		||||
     */
 | 
			
		||||
    virtual bd_size_t get_program_size() const;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3299,7 +3299,7 @@ FRESULT find_volume (	/* FR_OK(0): successful, !=0: any error occurred */
 | 
			
		|||
			fmt = bsect ? check_fs(fs, bsect) : 3;	/* Check the partition */
 | 
			
		||||
		} while (LD2PT(vol) == 0 && fmt >= 2 && ++i < 4);
 | 
			
		||||
	}
 | 
			
		||||
	if (fmt == 4) return FR_DISK_ERR;		/* An error occured in the disk I/O layer */
 | 
			
		||||
	if (fmt == 4) return FR_DISK_ERR;		/* An error occurred in the disk I/O layer */
 | 
			
		||||
	if (fmt >= 2) return FR_NO_FILESYSTEM;	/* No FAT volume is found */
 | 
			
		||||
 | 
			
		||||
	/* An FAT volume is found (bsect). Following code initializes the filesystem object */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,7 +75,7 @@ enum lfs_open_flags {
 | 
			
		|||
    LFS_F_DIRTY   = 0x10000, // File does not match storage
 | 
			
		||||
    LFS_F_WRITING = 0x20000, // File has been written since last flush
 | 
			
		||||
    LFS_F_READING = 0x40000, // File has been read since last flush
 | 
			
		||||
    LFS_F_ERRED   = 0x80000, // An error occured during write
 | 
			
		||||
    LFS_F_ERRED   = 0x80000, // An error occurred during write
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// File seek flags
 | 
			
		||||
| 
						 | 
				
			
			@ -439,7 +439,7 @@ int lfs_dir_rewind(lfs_t *lfs, lfs_dir_t *dir);
 | 
			
		|||
// Returns a negative error code on failure.
 | 
			
		||||
int lfs_traverse(lfs_t *lfs, int (*cb)(void*, lfs_block_t), void *data);
 | 
			
		||||
 | 
			
		||||
// Prunes any recoverable errors that may have occured in the filesystem
 | 
			
		||||
// Prunes any recoverable errors that may have occurred in the filesystem
 | 
			
		||||
//
 | 
			
		||||
// Not needed to be called by user unless an operation is interrupted
 | 
			
		||||
// but the filesystem is still mounted. This is already called on first
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -860,7 +860,7 @@ void LoRaWANStack::mcps_confirm_handler(loramac_mcps_confirm_t *mcps_confirm)
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    if (mcps_confirm->status != LORAMAC_EVENT_INFO_STATUS_OK) {
 | 
			
		||||
        // Couldn't schedule packet, ack not recieved in CONFIRMED case
 | 
			
		||||
        // Couldn't schedule packet, ack not received in CONFIRMED case
 | 
			
		||||
        // or some other error happened. Discard buffer, unset the tx-ongoing
 | 
			
		||||
        // flag and let the application know
 | 
			
		||||
        _tx_msg.tx_ongoing = false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -242,7 +242,7 @@ int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y );
 | 
			
		|||
void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief          Safe conditional assignement X = Y if assign is 1
 | 
			
		||||
 * \brief          Safe conditional assignment X = Y if assign is 1
 | 
			
		||||
 *
 | 
			
		||||
 * \param X        MPI to conditionally assign to
 | 
			
		||||
 * \param Y        Value to be assigned
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -76,7 +76,7 @@
 | 
			
		|||
#define MBEDTLS_ERR_X509_ALLOC_FAILED                     -0x2880  /**< Allocation of memory failed. */
 | 
			
		||||
#define MBEDTLS_ERR_X509_FILE_IO_ERROR                    -0x2900  /**< Read/write of file failed. */
 | 
			
		||||
#define MBEDTLS_ERR_X509_BUFFER_TOO_SMALL                 -0x2980  /**< Destination buffer is too small. */
 | 
			
		||||
#define MBEDTLS_ERR_X509_FATAL_ERROR                      -0x3000  /**< A fatal error occured, eg the chain is too long or the vrfy callback failed. */
 | 
			
		||||
#define MBEDTLS_ERR_X509_FATAL_ERROR                      -0x3000  /**< A fatal error occurred, eg the chain is too long or the vrfy callback failed. */
 | 
			
		||||
/* \} name */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			@ -249,7 +249,7 @@ int mbedtls_x509_serial_gets( char *buf, size_t size, const mbedtls_x509_buf *se
 | 
			
		|||
 *
 | 
			
		||||
 * \param to       mbedtls_x509_time to check
 | 
			
		||||
 *
 | 
			
		||||
 * \return         1 if the given time is in the past or an error occured,
 | 
			
		||||
 * \return         1 if the given time is in the past or an error occurred,
 | 
			
		||||
 *                 0 otherwise.
 | 
			
		||||
 */
 | 
			
		||||
int mbedtls_x509_time_is_past( const mbedtls_x509_time *to );
 | 
			
		||||
| 
						 | 
				
			
			@ -263,7 +263,7 @@ int mbedtls_x509_time_is_past( const mbedtls_x509_time *to );
 | 
			
		|||
 *
 | 
			
		||||
 * \param from     mbedtls_x509_time to check
 | 
			
		||||
 *
 | 
			
		||||
 * \return         1 if the given time is in the future or an error occured,
 | 
			
		||||
 * \return         1 if the given time is in the future or an error occurred,
 | 
			
		||||
 *                 0 otherwise.
 | 
			
		||||
 */
 | 
			
		||||
int mbedtls_x509_time_is_future( const mbedtls_x509_time *from );
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1470,7 +1470,7 @@ cleanup:
 | 
			
		|||
/*
 | 
			
		||||
 * For Montgomery curves, we do all the internal arithmetic in projective
 | 
			
		||||
 * coordinates. Import/export of points uses only the x coordinates, which is
 | 
			
		||||
 * internaly represented as X / Z.
 | 
			
		||||
 * internally represented as X / Z.
 | 
			
		||||
 *
 | 
			
		||||
 * For scalar multiplication, we'll use a Montgomery ladder.
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -481,7 +481,7 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
 | 
			
		|||
        if( use_ret == -(MBEDTLS_ERR_X509_BUFFER_TOO_SMALL) )
 | 
			
		||||
            mbedtls_snprintf( buf, buflen, "X509 - Destination buffer is too small" );
 | 
			
		||||
        if( use_ret == -(MBEDTLS_ERR_X509_FATAL_ERROR) )
 | 
			
		||||
            mbedtls_snprintf( buf, buflen, "X509 - A fatal error occured, eg the chain is too long or the vrfy callback failed" );
 | 
			
		||||
            mbedtls_snprintf( buf, buflen, "X509 - A fatal error occurred, eg the chain is too long or the vrfy callback failed" );
 | 
			
		||||
#endif /* MBEDTLS_X509_USE_C || MBEDTLS_X509_CREATE_C */
 | 
			
		||||
        // END generated code
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,7 +32,7 @@ extern "C" {
 | 
			
		|||
#endif
 | 
			
		||||
 | 
			
		||||
#define ST_AES_TIMEOUT    ((uint32_t) 0xFF) /* 255 ms timeout for the crypto processor */
 | 
			
		||||
#define ST_ERR_AES_BUSY   (-0x0023)      /* Crypto processor is busy, timeout occured */
 | 
			
		||||
#define ST_ERR_AES_BUSY   (-0x0023)      /* Crypto processor is busy, timeout occurred */
 | 
			
		||||
/**
 | 
			
		||||
 * \brief          AES context structure
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,7 +68,7 @@ protected:
 | 
			
		|||
 | 
			
		||||
    /** Bind a specific address to a socket
 | 
			
		||||
     *
 | 
			
		||||
     *  Binding a socket specifies the address and port on which to recieve
 | 
			
		||||
     *  Binding a socket specifies the address and port on which to receive
 | 
			
		||||
     *  data. If the IP address is zeroed, only the port is bound.
 | 
			
		||||
     *
 | 
			
		||||
     *  @param handle   Socket handle
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -60,7 +60,7 @@ void thread_dhcpv6_client_set_address(int8_t interface_id, dhcpv6_client_server_
 | 
			
		|||
 | 
			
		||||
void thread_dhcp_client_init(int8_t interface)
 | 
			
		||||
{
 | 
			
		||||
    // No support for multible thread instances yet.
 | 
			
		||||
    // No support for multiple thread instances yet.
 | 
			
		||||
    dhcp_client.service_instance = dhcp_service_init(interface, DHCP_INSTANCE_CLIENT, NULL);
 | 
			
		||||
    dhcp_client.interface = interface;
 | 
			
		||||
    dhcp_client.libDhcp_instance = libdhcpv6_nonTemporal_entry_get_unique_instance_id();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -552,7 +552,7 @@ static uint32_t reverse_bits(uint32_t num)
 | 
			
		|||
}
 | 
			
		||||
static void thread_panid_scan_response(int8_t if_id, const mlme_scan_conf_t* conf)
 | 
			
		||||
{
 | 
			
		||||
        bool conflict_occured = false;
 | 
			
		||||
        bool conflict_occurred = false;
 | 
			
		||||
        nwk_scan_params_t *scan_parameters_ptr;
 | 
			
		||||
        nwk_pan_descriptor_t *result;
 | 
			
		||||
        protocol_interface_info_entry_t *interface;
 | 
			
		||||
| 
						 | 
				
			
			@ -599,12 +599,12 @@ static void thread_panid_scan_response(int8_t if_id, const mlme_scan_conf_t* con
 | 
			
		|||
        if(result->pan_descriptor->CoordPANId == this->scan_ptr->panid) { //if pan id matches then send a conflict message
 | 
			
		||||
                tr_debug("Same pan id was found on channel %d", result->pan_descriptor->LogicalChannel);
 | 
			
		||||
                set_channel_mask(this->scan_ptr->channel_mask,result->pan_descriptor->LogicalChannel,0);
 | 
			
		||||
                conflict_occured = true;
 | 
			
		||||
                conflict_occurred = true;
 | 
			
		||||
    }
 | 
			
		||||
    result = result->next;
 | 
			
		||||
    } while (result);
 | 
			
		||||
    if (conflict_occured){
 | 
			
		||||
        tr_debug("conflict occured");
 | 
			
		||||
    if (conflict_occurred){
 | 
			
		||||
        tr_debug("conflict occurred");
 | 
			
		||||
        this->scan_ptr->timer = eventOS_timeout_ms(thread_panid_conflict_timeout_cb, 2000, this);
 | 
			
		||||
    }
 | 
			
		||||
    thread_start_mac_with_link_configuration(interface,linkConfiguration);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,21 +51,21 @@ public:
 | 
			
		|||
    /** Get the local IP address
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Null-terminated representation of the local IP address
 | 
			
		||||
     *                  or null if no IP address has been recieved
 | 
			
		||||
     *                  or null if no IP address has been received
 | 
			
		||||
     */
 | 
			
		||||
    virtual const char *get_ip_address();
 | 
			
		||||
 | 
			
		||||
    /** Get the local network mask
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Null-terminated representation of the local network mask 
 | 
			
		||||
     *                  or null if no network mask has been recieved
 | 
			
		||||
     *                  or null if no network mask has been received
 | 
			
		||||
     */
 | 
			
		||||
    virtual const char *get_netmask();
 | 
			
		||||
 | 
			
		||||
    /** Get the local gateway
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Null-terminated representation of the local gateway
 | 
			
		||||
     *                  or null if no network mask has been recieved
 | 
			
		||||
     *                  or null if no network mask has been received
 | 
			
		||||
     */
 | 
			
		||||
    virtual const char *get_gateway();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -130,7 +130,7 @@ protected:
 | 
			
		|||
 | 
			
		||||
    /** Bind a specific address to a socket
 | 
			
		||||
     *
 | 
			
		||||
     *  Binding a socket specifies the address and port on which to recieve
 | 
			
		||||
     *  Binding a socket specifies the address and port on which to receive
 | 
			
		||||
     *  data. If the IP address is zeroed, only the port is bound.
 | 
			
		||||
     *
 | 
			
		||||
     *  @param handle   Socket handle
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -78,7 +78,7 @@ public:
 | 
			
		|||
 | 
			
		||||
    /** Bind a specific address to a socket
 | 
			
		||||
     *
 | 
			
		||||
     *  Binding a socket specifies the address and port on which to recieve
 | 
			
		||||
     *  Binding a socket specifies the address and port on which to receive
 | 
			
		||||
     *  data.
 | 
			
		||||
     *
 | 
			
		||||
     *  @param port     Local port to bind
 | 
			
		||||
| 
						 | 
				
			
			@ -88,7 +88,7 @@ public:
 | 
			
		|||
 | 
			
		||||
    /** Bind a specific address to a socket
 | 
			
		||||
     *
 | 
			
		||||
     *  Binding a socket specifies the address and port on which to recieve
 | 
			
		||||
     *  Binding a socket specifies the address and port on which to receive
 | 
			
		||||
     *  data. If the IP address is zeroed, only the port is bound.
 | 
			
		||||
     *
 | 
			
		||||
     *  @param address  Null-terminated local address to bind
 | 
			
		||||
| 
						 | 
				
			
			@ -99,7 +99,7 @@ public:
 | 
			
		|||
 | 
			
		||||
    /** Bind a specific address to a socket
 | 
			
		||||
     *
 | 
			
		||||
     *  Binding a socket specifies the address and port on which to recieve
 | 
			
		||||
     *  Binding a socket specifies the address and port on which to receive
 | 
			
		||||
     *  data. If the IP address is zeroed, only the port is bound.
 | 
			
		||||
     *
 | 
			
		||||
     *  @param address  Local address to bind
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -211,21 +211,21 @@ public:
 | 
			
		|||
    /** Get the local IP address
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Null-terminated representation of the local IP address
 | 
			
		||||
     *                  or null if no IP address has been recieved
 | 
			
		||||
     *                  or null if no IP address has been received
 | 
			
		||||
     */
 | 
			
		||||
    virtual const char *get_ip_address();
 | 
			
		||||
 | 
			
		||||
    /** Get the local network mask
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Null-terminated representation of the local network mask
 | 
			
		||||
     *                  or null if no network mask has been recieved
 | 
			
		||||
     *                  or null if no network mask has been received
 | 
			
		||||
     */
 | 
			
		||||
    virtual const char *get_netmask();
 | 
			
		||||
 | 
			
		||||
    /** Get the local gateways
 | 
			
		||||
     *
 | 
			
		||||
     *  @return         Null-terminated representation of the local gateway
 | 
			
		||||
     *                  or null if no network mask has been recieved
 | 
			
		||||
     *                  or null if no network mask has been received
 | 
			
		||||
     */
 | 
			
		||||
    virtual const char *get_gateway();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -403,7 +403,7 @@ typedef struct nsapi_stack_api
 | 
			
		|||
 | 
			
		||||
    /** Bind a specific address to a socket
 | 
			
		||||
     *
 | 
			
		||||
     *  Binding a socket specifies the address and port on which to recieve
 | 
			
		||||
     *  Binding a socket specifies the address and port on which to receive
 | 
			
		||||
     *  data. If the IP address is zeroed, only the port is bound.
 | 
			
		||||
     *
 | 
			
		||||
     *  @param stack    Stack handle
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -936,7 +936,7 @@ The following provides general notes on the handling of errors:
 | 
			
		|||
- Supported backends may include non-volatile storage (flash) and SRAM.
 | 
			
		||||
- For example. if a non-volatile storage (flash) backend is supported, then the flushing of data to the NV store must be atomic.
 | 
			
		||||
  This may require that flushing of data to flash is commited using an atomic write operation e.g. of a CRC32 value for the 
 | 
			
		||||
  commit data. If power loss occured during the atomic write then the CRC32 would be invalid, the previously written data would
 | 
			
		||||
  commit data. If power loss occurred during the atomic write then the CRC32 would be invalid, the previously written data would
 | 
			
		||||
  not be valid, and the system would have to revert to a previous version of the data that has successfully commited the correct CRC32
 | 
			
		||||
  value. 
 | 
			
		||||
  
 | 
			
		||||
| 
						 | 
				
			
			@ -1080,7 +1080,7 @@ split the writing of the value into M writes, where N/M is smaller than availabl
 | 
			
		|||
In the case the the Write() call fails with return code `ARM_CFSTORE_DRIVER_ERROR_OUT_OF_MEMORY`
 | 
			
		||||
then the client may retry the write transaction with a smaller length (less bytes).
 | 
			
		||||
 | 
			
		||||
Further, a client of the Write() function should alway check the returned value of the
 | 
			
		||||
Further, a client of the Write() function should always check the returned value of the
 | 
			
		||||
len argment as this records the actual number of bytes written. CFSTORE may be able to 
 | 
			
		||||
write a number of bytes less that the total number in the data buffer supplied by the 
 | 
			
		||||
client. The unwritten bytes should be supplied to a second call to Write(). 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1555,7 +1555,7 @@ static int32_t cfstore_flash_map_error(int32_t flash_journal_status_code)
 | 
			
		|||
 *          In flash journal async mode, when:
 | 
			
		||||
 *              - a FlashJournal_xxx() function has been invoked, and
 | 
			
		||||
 *              - before the async completion has been received and processed
 | 
			
		||||
 *          the application context code should alway co-ordinate access to
 | 
			
		||||
 *          the application context code should always coordinate access to
 | 
			
		||||
 *          context variables modified by interrupt and application context
 | 
			
		||||
 *          by use of the critical_section_xxx.
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			@ -3497,7 +3497,7 @@ static int32_t cfstore_create(const char* key_name, ARM_CFSTORE_SIZE value_len,
 | 
			
		|||
        ret = cfstore_recreate(key_name, value_len, hkey, &hkvt);
 | 
			
		||||
        goto out1;
 | 
			
		||||
    }
 | 
			
		||||
    /* not a valid hkvt implying the key_name wasnt found */
 | 
			
		||||
    /* not a valid hkvt implying the key_name wasn't found */
 | 
			
		||||
 | 
			
		||||
    /* create new key */
 | 
			
		||||
    ret = cfstore_validate_key_desc(kdesc);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -170,7 +170,7 @@ bool USBMSD::EPBULK_OUT_callback() {
 | 
			
		|||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
            // an error has occured: stall endpoint and send CSW
 | 
			
		||||
            // an error has occurred: stall endpoint and send CSW
 | 
			
		||||
        default:
 | 
			
		||||
            stallEndpoint(EPBULK_OUT);
 | 
			
		||||
            csw.Status = CSW_ERROR;
 | 
			
		||||
| 
						 | 
				
			
			@ -207,7 +207,7 @@ bool USBMSD::EPBULK_IN_callback() {
 | 
			
		|||
            stage = READ_CBW;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        // an error has occured
 | 
			
		||||
        // an error has occurred
 | 
			
		||||
        default:
 | 
			
		||||
            stallEndpoint(EPBULK_IN);
 | 
			
		||||
            sendCSW();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,7 +40,7 @@ static const char *epStatusStr[] = {
 | 
			
		|||
 | 
			
		||||
/*
 | 
			
		||||
 * USBDEP_Ep0Handler() is called each time a packet has been transmitted
 | 
			
		||||
 * or recieved on the default endpoint.
 | 
			
		||||
 * or received on the default endpoint.
 | 
			
		||||
 * A state machine navigate us through the phases of a control transfer
 | 
			
		||||
 * according to "chapter 9" in the USB spec.
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			@ -417,7 +417,7 @@ void USBDEP_Ep0Handler( USBD_Device_TypeDef *device )
 | 
			
		|||
 | 
			
		||||
/*
 | 
			
		||||
 * USBDEP_EpHandler() is called each time a packet has been transmitted
 | 
			
		||||
 * or recieved on an endpoint other than the default endpoint.
 | 
			
		||||
 * or received on an endpoint other than the default endpoint.
 | 
			
		||||
 */
 | 
			
		||||
void USBDEP_EpHandler( uint8_t epAddr )
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,7 +48,7 @@ public:
 | 
			
		|||
     * Pin Options:
 | 
			
		||||
     *  (5, 6, 7) or (11, 12, 13)
 | 
			
		||||
     *
 | 
			
		||||
     *  mosi or miso can be specfied as NC if not used
 | 
			
		||||
     *  mosi or miso can be specified as NC if not used
 | 
			
		||||
     *
 | 
			
		||||
     *  @param mosi SPI Master Out, Slave In pin
 | 
			
		||||
     *  @param miso SPI Master In, Slave Out pin
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,7 +40,7 @@ int ethernet_write(const char *data, int size);
 | 
			
		|||
// send ethernet write buffer, returning the packet size sent
 | 
			
		||||
int ethernet_send(void);
 | 
			
		||||
 | 
			
		||||
// recieve from ethernet buffer, returning packet size, or 0 if no packet
 | 
			
		||||
// receive from ethernet buffer, returning packet size, or 0 if no packet
 | 
			
		||||
int ethernet_receive(void);
 | 
			
		||||
 | 
			
		||||
// read size bytes in to data, return actual num bytes read (0..size)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -119,7 +119,7 @@ int  spi_master_write(spi_t *obj, int value);
 | 
			
		|||
 | 
			
		||||
/** Write a block out in master mode and receive a value
 | 
			
		||||
 *
 | 
			
		||||
 *  The total number of bytes sent and recieved will be the maximum of
 | 
			
		||||
 *  The total number of bytes sent and received will be the maximum of
 | 
			
		||||
 *  tx_length and rx_length. The bytes written will be padded with the
 | 
			
		||||
 *  value 0xff.
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -158,7 +158,7 @@ int ATCmdParser::vscanf(const char *format, va_list args)
 | 
			
		|||
        if (j+1 >= _buffer_size - offset) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        // Recieve next character
 | 
			
		||||
        // Receive next character
 | 
			
		||||
        int c = getc();
 | 
			
		||||
        if (c < 0) {
 | 
			
		||||
            return -1;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -565,7 +565,7 @@ public:
 | 
			
		|||
private:
 | 
			
		||||
    // Stored as pointer to function and pointer to optional object
 | 
			
		||||
    // Function pointer is stored as union of possible function types
 | 
			
		||||
    // to garuntee proper size and alignment
 | 
			
		||||
    // to guarantee proper size and alignment
 | 
			
		||||
    struct _class;
 | 
			
		||||
    union {
 | 
			
		||||
        void (*_staticfunc)();
 | 
			
		||||
| 
						 | 
				
			
			@ -1140,7 +1140,7 @@ public:
 | 
			
		|||
private:
 | 
			
		||||
    // Stored as pointer to function and pointer to optional object
 | 
			
		||||
    // Function pointer is stored as union of possible function types
 | 
			
		||||
    // to garuntee proper size and alignment
 | 
			
		||||
    // to guarantee proper size and alignment
 | 
			
		||||
    struct _class;
 | 
			
		||||
    union {
 | 
			
		||||
        void (*_staticfunc)(A0);
 | 
			
		||||
| 
						 | 
				
			
			@ -1716,7 +1716,7 @@ public:
 | 
			
		|||
private:
 | 
			
		||||
    // Stored as pointer to function and pointer to optional object
 | 
			
		||||
    // Function pointer is stored as union of possible function types
 | 
			
		||||
    // to garuntee proper size and alignment
 | 
			
		||||
    // to guarantee proper size and alignment
 | 
			
		||||
    struct _class;
 | 
			
		||||
    union {
 | 
			
		||||
        void (*_staticfunc)(A0, A1);
 | 
			
		||||
| 
						 | 
				
			
			@ -2293,7 +2293,7 @@ public:
 | 
			
		|||
private:
 | 
			
		||||
    // Stored as pointer to function and pointer to optional object
 | 
			
		||||
    // Function pointer is stored as union of possible function types
 | 
			
		||||
    // to garuntee proper size and alignment
 | 
			
		||||
    // to guarantee proper size and alignment
 | 
			
		||||
    struct _class;
 | 
			
		||||
    union {
 | 
			
		||||
        void (*_staticfunc)(A0, A1, A2);
 | 
			
		||||
| 
						 | 
				
			
			@ -2871,7 +2871,7 @@ public:
 | 
			
		|||
private:
 | 
			
		||||
    // Stored as pointer to function and pointer to optional object
 | 
			
		||||
    // Function pointer is stored as union of possible function types
 | 
			
		||||
    // to garuntee proper size and alignment
 | 
			
		||||
    // to guarantee proper size and alignment
 | 
			
		||||
    struct _class;
 | 
			
		||||
    union {
 | 
			
		||||
        void (*_staticfunc)(A0, A1, A2, A3);
 | 
			
		||||
| 
						 | 
				
			
			@ -3450,7 +3450,7 @@ public:
 | 
			
		|||
private:
 | 
			
		||||
    // Stored as pointer to function and pointer to optional object
 | 
			
		||||
    // Function pointer is stored as union of possible function types
 | 
			
		||||
    // to garuntee proper size and alignment
 | 
			
		||||
    // to guarantee proper size and alignment
 | 
			
		||||
    struct _class;
 | 
			
		||||
    union {
 | 
			
		||||
        void (*_staticfunc)(A0, A1, A2, A3, A4);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,11 +25,11 @@ namespace mbed {
 | 
			
		|||
 | 
			
		||||
/**
 | 
			
		||||
 * Inheriting from this class autogeneration of copy construction and copy
 | 
			
		||||
 * assignement operations.
 | 
			
		||||
 * assignment operations.
 | 
			
		||||
 *
 | 
			
		||||
 * Classes which are not value type should inherit privately from this class
 | 
			
		||||
 * to avoid generation of invalid copy constructor or copy assignement operator
 | 
			
		||||
 * which can lead to unoticeable programming errors.
 | 
			
		||||
 * to avoid generation of invalid copy constructor or copy assignment operator
 | 
			
		||||
 * which can lead to unnoticeable programming errors.
 | 
			
		||||
 *
 | 
			
		||||
 * As an example consider the following signature:
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			@ -50,7 +50,7 @@ namespace mbed {
 | 
			
		|||
 * @endcode
 | 
			
		||||
 *
 | 
			
		||||
 * There is a bug in this function, it returns a temporary value which will be
 | 
			
		||||
 * byte copied into foo then destroyed. Unfortunately, internaly the Foo class
 | 
			
		||||
 * byte copied into foo then destroyed. Unfortunately, internally the Foo class
 | 
			
		||||
 * manage a pointer to a Resource object. This pointer will be released when the
 | 
			
		||||
 * temporary is destroyed and foo will manage a pointer to an already released
 | 
			
		||||
 * Resource.
 | 
			
		||||
| 
						 | 
				
			
			@ -71,9 +71,9 @@ namespace mbed {
 | 
			
		|||
 * Foo* m = make_foo();
 | 
			
		||||
 * @endcode
 | 
			
		||||
 *
 | 
			
		||||
 *   - Copy constructor and copy assignement operator has to be made private
 | 
			
		||||
 *   - Copy constructor and copy assignment operator has to be made private
 | 
			
		||||
 *     in the Foo class. It prevents unwanted copy of Foo objects. This can be
 | 
			
		||||
 *     done by declaring copy constructor and copy assignement in the private
 | 
			
		||||
 *     done by declaring copy constructor and copy assignment in the private
 | 
			
		||||
 *     section of the Foo class.
 | 
			
		||||
 *
 | 
			
		||||
 * @code
 | 
			
		||||
| 
						 | 
				
			
			@ -92,7 +92,7 @@ namespace mbed {
 | 
			
		|||
 *
 | 
			
		||||
 * Another solution is to inherit privately from the NonCopyable class.
 | 
			
		||||
 * It reduces the boiler plate needed to avoid copy operations but more
 | 
			
		||||
 * importantly it clarifies the programer intent and the object semantic.
 | 
			
		||||
 * importantly it clarifies the programmer intent and the object semantic.
 | 
			
		||||
 *
 | 
			
		||||
 * class Foo : private NonCopyable<Foo> {
 | 
			
		||||
 * public:
 | 
			
		||||
| 
						 | 
				
			
			@ -121,7 +121,7 @@ namespace mbed {
 | 
			
		|||
 * };
 | 
			
		||||
 *
 | 
			
		||||
 * // empty base optimization cannot be applied here because A from C and A from
 | 
			
		||||
 * // B shall have a different address. In that case, with the alignement
 | 
			
		||||
 * // B shall have a different address. In that case, with the alignment
 | 
			
		||||
 * // sizeof(C) == 2* sizeof(int)
 | 
			
		||||
 * @endcode
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			@ -150,11 +150,11 @@ template<typename T>
 | 
			
		|||
class NonCopyable {
 | 
			
		||||
protected:
 | 
			
		||||
    /**
 | 
			
		||||
     * Disalow construction of NonCopyable objects from outside of its hierarchy.
 | 
			
		||||
     * Disallow construction of NonCopyable objects from outside of its hierarchy.
 | 
			
		||||
     */
 | 
			
		||||
    NonCopyable() { }
 | 
			
		||||
    /**
 | 
			
		||||
     * Disalow destruction of NonCopyable objects from outside of its hierarchy.
 | 
			
		||||
     * Disallow destruction of NonCopyable objects from outside of its hierarchy.
 | 
			
		||||
     */
 | 
			
		||||
    ~NonCopyable() { }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -199,7 +199,7 @@ private:
 | 
			
		|||
    NonCopyable(const NonCopyable&);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Declare copy assignement operator as private, any attempt to copy assign
 | 
			
		||||
     * Declare copy assignment operator as private, any attempt to copy assign
 | 
			
		||||
     * a NonCopyable will fail at compile time.
 | 
			
		||||
     */
 | 
			
		||||
    NonCopyable& operator=(const NonCopyable&);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -422,7 +422,7 @@ typedef struct Dir DIR;
 | 
			
		|||
#define     S_IXUSR 0000100 ///< execute/search permission, owner
 | 
			
		||||
#define S_IRWXG     (S_IRGRP | S_IWGRP | S_IXGRP)
 | 
			
		||||
#define     S_IRGRP 0000040 ///< read permission, group
 | 
			
		||||
#define     S_IWGRP 0000020 ///< write permission, grougroup
 | 
			
		||||
#define     S_IWGRP 0000020 ///< write permission, group
 | 
			
		||||
#define     S_IXGRP 0000010 ///< execute/search permission, group
 | 
			
		||||
#define S_IRWXO     (S_IROTH | S_IWOTH | S_IXOTH)
 | 
			
		||||
#define     S_IROTH 0000004 ///< read permission, other
 | 
			
		||||
| 
						 | 
				
			
			@ -461,7 +461,7 @@ struct statvfs {
 | 
			
		|||
    unsigned long  f_namemax;  ///< Maximum filename length
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/* The following are dirent.h definitions are declared here to garuntee
 | 
			
		||||
/* The following are dirent.h definitions are declared here to guarantee
 | 
			
		||||
 * consistency where structure may be different with different toolchains
 | 
			
		||||
 */
 | 
			
		||||
struct dirent {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -58,11 +58,11 @@ int ethernet_receive()
 | 
			
		|||
    return smsc9220_peek_next_packet_size();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Read from an recevied ethernet packet.*/
 | 
			
		||||
/* After receive returnd a number bigger than 0 it is*/
 | 
			
		||||
/* Read from an received ethernet packet.*/
 | 
			
		||||
/* After receive returned a number bigger than 0 it is*/
 | 
			
		||||
/* possible to read bytes from this packet.*/
 | 
			
		||||
/* Read will write up to size bytes into data.*/
 | 
			
		||||
/* It is possible to use read multible times.*/
 | 
			
		||||
/* It is possible to use read multiple times.*/
 | 
			
		||||
/* Each time read will start reading after the last read byte before. */
 | 
			
		||||
int ethernet_read(char *data, int dlen)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -375,7 +375,7 @@ unsigned int smsc9220_recv_packet(unsigned int *recvbuf, unsigned int *index)
 | 
			
		|||
        if(rxfifo_stat != 0) {   // Fetch status of this packet
 | 
			
		||||
            pktsize = ((rxfifo_stat >> 16) & 0x3FFF);
 | 
			
		||||
            if(rxfifo_stat & (1 << 15)) {
 | 
			
		||||
                printf("Error occured during receiving of packets on the bus.\n");
 | 
			
		||||
                printf("Error occurred during receiving of packets on the bus.\n");
 | 
			
		||||
                return 1;
 | 
			
		||||
            } else {
 | 
			
		||||
                /* Below formula (recommended by SMSC9220 code)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ extern "C" {
 | 
			
		|||
// send ethernet write buffer, returning the packet size sent
 | 
			
		||||
int ethernet_transmission(unsigned char * pkt, unsigned int length);
 | 
			
		||||
 | 
			
		||||
// recieve from ethernet buffer, returning packet size, or 0 if no packet
 | 
			
		||||
// receive from ethernet buffer, returning packet size, or 0 if no packet
 | 
			
		||||
int ethernet_reception(unsigned int *recvbuf, unsigned int *index);
 | 
			
		||||
 | 
			
		||||
// get the ethernet address
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -136,11 +136,11 @@ int ethernet_receive()
 | 
			
		|||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Read from an recevied ethernet packet.
 | 
			
		||||
// After receive returnd a number bigger than 0 it is
 | 
			
		||||
// Read from an received ethernet packet.
 | 
			
		||||
// After receive returned a number bigger than 0 it is
 | 
			
		||||
// possible to read bytes from this packet.
 | 
			
		||||
// Read will write up to size bytes into data.
 | 
			
		||||
// It is possible to use read multible times.
 | 
			
		||||
// It is possible to use read multiple times.
 | 
			
		||||
// Each time read will start reading after the last read byte before.
 | 
			
		||||
 | 
			
		||||
int ethernet_read(char *data, int dlen) 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -375,7 +375,7 @@ unsigned int smsc9220_recv_packet(unsigned int *recvbuf, unsigned int *index)
 | 
			
		|||
        if(rxfifo_stat != 0) {   // Fetch status of this packet
 | 
			
		||||
            pktsize = ((rxfifo_stat >> 16) & 0x3FFF);
 | 
			
		||||
            if(rxfifo_stat & (1 << 15)) {
 | 
			
		||||
                printf("Error occured during receiving of packets on the bus.\n");
 | 
			
		||||
                printf("Error occurred during receiving of packets on the bus.\n");
 | 
			
		||||
                return 1;
 | 
			
		||||
            } else {
 | 
			
		||||
                /* Below formula (recommended by SMSC9220 code)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ extern "C" {
 | 
			
		|||
// send ethernet write buffer, returning the packet size sent
 | 
			
		||||
int ethernet_transmission(unsigned char * pkt, unsigned int length);
 | 
			
		||||
 | 
			
		||||
// recieve from ethernet buffer, returning packet size, or 0 if no packet
 | 
			
		||||
// receive from ethernet buffer, returning packet size, or 0 if no packet
 | 
			
		||||
int ethernet_reception(unsigned int *recvbuf, unsigned int *index);
 | 
			
		||||
 | 
			
		||||
// get the ethernet address
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -136,11 +136,11 @@ int ethernet_receive()
 | 
			
		|||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Read from an recevied ethernet packet.
 | 
			
		||||
// After receive returnd a number bigger than 0 it is
 | 
			
		||||
// Read from an received ethernet packet.
 | 
			
		||||
// After receive returned a number bigger than 0 it is
 | 
			
		||||
// possible to read bytes from this packet.
 | 
			
		||||
// Read will write up to size bytes into data.
 | 
			
		||||
// It is possible to use read multible times.
 | 
			
		||||
// It is possible to use read multiple times.
 | 
			
		||||
// Each time read will start reading after the last read byte before.
 | 
			
		||||
 | 
			
		||||
int ethernet_read(char *data, int dlen) 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -327,7 +327,7 @@ int spi_master_write(spi_t *obj, int value)
 | 
			
		|||
 | 
			
		||||
/** Write a block out in master mode and receive a value
 | 
			
		||||
 *
 | 
			
		||||
 *  The total number of bytes sent and recieved will be the maximum of
 | 
			
		||||
 *  The total number of bytes sent and received will be the maximum of
 | 
			
		||||
 *  tx_length and rx_length. The bytes written will be padded with the
 | 
			
		||||
 *  value 0xff.
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -303,7 +303,7 @@ ADI_TMR_RESULT adi_tmr_ConfigTimer(ADI_TMR_DEVICE const eDevice, ADI_TMR_CONFIG*
 | 
			
		|||
 *
 | 
			
		||||
 * @details     The timer can be configured to capture the timer value when a specific event occurs. The
 | 
			
		||||
 *              list of events can be found in the hardware reference manual. The callback function specified
 | 
			
		||||
 *              in #adi_tmr_Init will be supplied #ADI_TMR_EVENT_CAPTURE to indicate the event occured. The 
 | 
			
		||||
 *              in #adi_tmr_Init will be supplied #ADI_TMR_EVENT_CAPTURE to indicate the event occurred. The 
 | 
			
		||||
 *              user can then read the captured value by calling #adi_tmr_GetCaptureCount.
 | 
			
		||||
 *
 | 
			
		||||
 * @note        This function can only be called when the timer is disabled.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1814,7 +1814,7 @@ ADI_UART_RESULT adi_uart_GetBaudRate(
 | 
			
		|||
 | 
			
		||||
#endif /* ADI_DEBUG */
 | 
			
		||||
 | 
			
		||||
    /* If an error occured during autobaud this value will be set to a
 | 
			
		||||
    /* If an error occurred during autobaud this value will be set to a
 | 
			
		||||
       non-zero value. The specific error can be found by checking against
 | 
			
		||||
       #ADI_UART_EVENT.
 | 
			
		||||
    */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -302,7 +302,7 @@ int spi_master_write(spi_t *obj, int value)
 | 
			
		|||
 | 
			
		||||
/** Write a block out in master mode and receive a value
 | 
			
		||||
 *
 | 
			
		||||
 *  The total number of bytes sent and recieved will be the maximum of
 | 
			
		||||
 *  The total number of bytes sent and received will be the maximum of
 | 
			
		||||
 *  tx_length and rx_length. The bytes written will be padded with the
 | 
			
		||||
 *  value 0xff.
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -284,7 +284,7 @@ ADI_TMR_RESULT adi_tmr_ConfigTimer(ADI_TMR_DEVICE const eDevice, ADI_TMR_CONFIG
 | 
			
		|||
 *
 | 
			
		||||
 * @details     The timer can be configured to capture the timer value when a specific event occurs. The
 | 
			
		||||
 *              list of events can be found in the hardware reference manual. The callback function specified
 | 
			
		||||
 *              in #adi_tmr_Init will be supplied #ADI_TMR_EVENT_CAPTURE to indicate the event occured. The 
 | 
			
		||||
 *              in #adi_tmr_Init will be supplied #ADI_TMR_EVENT_CAPTURE to indicate the event occurred. The 
 | 
			
		||||
 *              user can then read the captured value by calling #adi_tmr_GetCaptureCount.
 | 
			
		||||
 *
 | 
			
		||||
 * @note        This function can only be called when the timer is disabled.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1808,7 +1808,7 @@ ADI_UART_RESULT adi_uart_GetBaudRate(
 | 
			
		|||
 | 
			
		||||
#endif /* ADI_DEBUG */
 | 
			
		||||
 | 
			
		||||
    /* If an error occured during autobaud this value will be set to a
 | 
			
		||||
    /* If an error occurred during autobaud this value will be set to a
 | 
			
		||||
       non-zero value. The specific error can be found by checking against
 | 
			
		||||
       #ADI_UART_EVENT.
 | 
			
		||||
    */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1354,10 +1354,10 @@ enum status_code tcc_set_pattern(
 | 
			
		|||
 *
 | 
			
		||||
 * \return Bitmask of \c TCC_STATUS_* flags.
 | 
			
		||||
 *
 | 
			
		||||
 * \retval TCC_STATUS_CHANNEL_MATCH_CAPTURE(n)         Channel n match/capture has occured
 | 
			
		||||
 * \retval TCC_STATUS_CHANNEL_MATCH_CAPTURE(n)         Channel n match/capture has occurred
 | 
			
		||||
 * \retval TCC_STATUS_CHANNEL_OUTPUT(n)                Channel n match/capture output state
 | 
			
		||||
 * \retval TCC_STATUS_NON_RECOVERABLE_FAULT_OCCUR(x)   Non-recoverable fault x has occured
 | 
			
		||||
 * \retval TCC_STATUS_RECOVERABLE_FAULT_OCCUR(n)       Recoverable fault n has occured
 | 
			
		||||
 * \retval TCC_STATUS_NON_RECOVERABLE_FAULT_OCCUR(x)   Non-recoverable fault x has occurred
 | 
			
		||||
 * \retval TCC_STATUS_RECOVERABLE_FAULT_OCCUR(n)       Recoverable fault n has occurred
 | 
			
		||||
 * \retval TCC_STATUS_NON_RECOVERABLE_FAULT_PRESENT(x) Non-recoverable fault x input present
 | 
			
		||||
 * \retval TCC_STATUS_RECOVERABLE_FAULT_PRESENT(n)     Recoverable fault n input present
 | 
			
		||||
 * \retval TCC_STATUS_SYNC_READY          None of register is syncing
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -852,7 +852,7 @@ enum tcc_callback {
 | 
			
		|||
#define TCC_STATUS_CHANNEL_OUTPUT(ch)               (1UL << ((ch)+8))
 | 
			
		||||
/** A Non-Recoverable Fault \c x (0 ~ 1) has occurred. */
 | 
			
		||||
#define TCC_STATUS_NON_RECOVERABLE_FAULT_OCCUR(x)   (1UL << ((x)+16))
 | 
			
		||||
/** A Recoverable Fault \c n (0 ~ 1 representing A ~ B) has occured. */
 | 
			
		||||
/** A Recoverable Fault \c n (0 ~ 1 representing A ~ B) has occurred. */
 | 
			
		||||
#define TCC_STATUS_RECOVERABLE_FAULT_OCCUR(n)       (1UL << ((n)+18))
 | 
			
		||||
/** The Non-Recoverable Fault \c x (0 ~ 1) input is present. */
 | 
			
		||||
#define TCC_STATUS_NON_RECOVERABLE_FAULT_PRESENT(x) (1UL << ((x)+20))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1024,7 +1024,7 @@ int serial_rx_irq_handler_asynch(serial_t *obj)
 | 
			
		|||
        event |= SERIAL_EVENT_RX_CHARACTER_MATCH;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* Return to the call back if character match occured */
 | 
			
		||||
    /* Return to the call back if character match occurred */
 | 
			
		||||
    if(event != 0) {
 | 
			
		||||
        serial_rx_abort_asynch(obj);
 | 
			
		||||
        return event & obj->serial.events;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,7 +75,7 @@ typedef struct {
 | 
			
		|||
#define   RSTC_SR_RSTTYP_WDT_RST (0x2u << 8) /**< \brief (RSTC_SR) Watchdog fault occurred */
 | 
			
		||||
#define   RSTC_SR_RSTTYP_SOFT_RST (0x3u << 8) /**< \brief (RSTC_SR) Processor reset required by the software */
 | 
			
		||||
#define   RSTC_SR_RSTTYP_USER_RST (0x4u << 8) /**< \brief (RSTC_SR) NRST pin detected low */
 | 
			
		||||
#define   RSTC_SR_RSTTYP_SLCK_XTAL_RST (0x7u << 8) /**< \brief (RSTC_SR) Slow Crystal Failure Detection fault occured */
 | 
			
		||||
#define   RSTC_SR_RSTTYP_SLCK_XTAL_RST (0x7u << 8) /**< \brief (RSTC_SR) Slow Crystal Failure Detection fault occurred */
 | 
			
		||||
#define RSTC_SR_NRSTL (0x1u << 16) /**< \brief (RSTC_SR) NRST Pin Level */
 | 
			
		||||
#define RSTC_SR_SRCMP (0x1u << 17) /**< \brief (RSTC_SR) Software Reset Command in Progress */
 | 
			
		||||
/* -------- RSTC_MR : (RSTC Offset: 0x08) Mode Register -------- */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ enum _sai_transfer_state
 | 
			
		|||
{
 | 
			
		||||
    kSAI_Busy = 0x0U, /*!< SAI is busy */
 | 
			
		||||
    kSAI_Idle,        /*!< Transfer is done. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occured. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occurred. */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*! @brief Typedef for sai tx interrupt handler. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ enum _qspi_transfer_state
 | 
			
		|||
{
 | 
			
		||||
    kQSPI_TxBusy = 0x0U, /*!< QSPI is busy */
 | 
			
		||||
    kQSPI_TxIdle,        /*!< Transfer is done. */
 | 
			
		||||
    kQSPI_TxError        /*!< Transfer error occured. */
 | 
			
		||||
    kQSPI_TxError        /*!< Transfer error occurred. */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define QSPI_AHB_BUFFER_REG(base, index) (*((uint32_t *)&(base->BUF0CR) + index))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ enum _sai_transfer_state
 | 
			
		|||
{
 | 
			
		||||
    kSAI_Busy = 0x0U, /*!< SAI is busy */
 | 
			
		||||
    kSAI_Idle,        /*!< Transfer is done. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occured. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occurred. */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*! @brief Typedef for sai tx interrupt handler. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1173,7 +1173,7 @@ typedef enum _trng_statistical_check
 | 
			
		|||
 * TRNG access mode in the SA-TRNG Miscellaneous Control Register.
 | 
			
		||||
 *
 | 
			
		||||
 * Values:
 | 
			
		||||
 * - 0b0 - Programability of registers controlled only by the RNG Miscellaneous
 | 
			
		||||
 * - 0b0 - Programmability of registers controlled only by the RNG Miscellaneous
 | 
			
		||||
 *     Control Register's access mode bit.
 | 
			
		||||
 * - 0b1 - Overides RNG Miscellaneous Control Register access mode and prevents
 | 
			
		||||
 *     TRNG register programming.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ enum _sai_transfer_state
 | 
			
		|||
{
 | 
			
		||||
    kSAI_Busy = 0x0U, /*!< SAI is busy */
 | 
			
		||||
    kSAI_Idle,        /*!< Transfer is done. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occured. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occurred. */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*! @brief Typedef for sai tx interrupt handler. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -56,7 +56,7 @@ struct _sai_dma_handle
 | 
			
		|||
    uint8_t bytesPerFrame;                        /*!< Bytes in a frame */
 | 
			
		||||
    uint8_t channel;                              /*!< Which Data channel SAI use */
 | 
			
		||||
    uint32_t state;                               /*!< SAI DMA transfer internal state */
 | 
			
		||||
    sai_dma_callback_t callback;                  /*!< Callback for users while transfer finish or error occured */
 | 
			
		||||
    sai_dma_callback_t callback;                  /*!< Callback for users while transfer finish or error occurred */
 | 
			
		||||
    void *userData;                               /*!< User callback parameter */
 | 
			
		||||
    sai_transfer_t saiQueue[SAI_XFER_QUEUE_SIZE]; /*!< Transfer queue storing queued transfer. */
 | 
			
		||||
    size_t transferSize[SAI_XFER_QUEUE_SIZE];     /*!< Data bytes need to transfer */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ enum _qspi_transfer_state
 | 
			
		|||
{
 | 
			
		||||
    kQSPI_TxBusy = 0x0U, /*!< QSPI is busy */
 | 
			
		||||
    kQSPI_TxIdle,        /*!< Transfer is done. */
 | 
			
		||||
    kQSPI_TxError        /*!< Transfer error occured. */
 | 
			
		||||
    kQSPI_TxError        /*!< Transfer error occurred. */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define QSPI_AHB_BUFFER_REG(base, index) (*((uint32_t *)&(base->BUF0CR) + index))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1173,7 +1173,7 @@ typedef enum _trng_statistical_check
 | 
			
		|||
 * TRNG access mode in the SA-TRNG Miscellaneous Control Register.
 | 
			
		||||
 *
 | 
			
		||||
 * Values:
 | 
			
		||||
 * - 0b0 - Programability of registers controlled only by the RNG Miscellaneous
 | 
			
		||||
 * - 0b0 - Programmability of registers controlled only by the RNG Miscellaneous
 | 
			
		||||
 *     Control Register's access mode bit.
 | 
			
		||||
 * - 0b1 - Overides RNG Miscellaneous Control Register access mode and prevents
 | 
			
		||||
 *     TRNG register programming.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ enum _sai_transfer_state
 | 
			
		|||
{
 | 
			
		||||
    kSAI_Busy = 0x0U, /*!< SAI is busy */
 | 
			
		||||
    kSAI_Idle,        /*!< Transfer is done. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occured. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occurred. */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*! @brief Typedef for sai tx interrupt handler. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1173,7 +1173,7 @@ typedef enum _trng_statistical_check
 | 
			
		|||
 * TRNG access mode in the SA-TRNG Miscellaneous Control Register.
 | 
			
		||||
 *
 | 
			
		||||
 * Values:
 | 
			
		||||
 * - 0b0 - Programability of registers controlled only by the RNG Miscellaneous
 | 
			
		||||
 * - 0b0 - Programmability of registers controlled only by the RNG Miscellaneous
 | 
			
		||||
 *     Control Register's access mode bit.
 | 
			
		||||
 * - 0b1 - Overides RNG Miscellaneous Control Register access mode and prevents
 | 
			
		||||
 *     TRNG register programming.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ enum _sai_transfer_state
 | 
			
		|||
{
 | 
			
		||||
    kSAI_Busy = 0x0U, /*!< SAI is busy */
 | 
			
		||||
    kSAI_Idle,        /*!< Transfer is done. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occured. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occurred. */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*! @brief Typedef for sai tx interrupt handler. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ enum _sai_transfer_state
 | 
			
		|||
{
 | 
			
		||||
    kSAI_Busy = 0x0U, /*!< SAI is busy */
 | 
			
		||||
    kSAI_Idle,        /*!< Transfer is done. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occured. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occurred. */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*! @brief Typedef for sai tx interrupt handler. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ enum _sai_transfer_state
 | 
			
		|||
{
 | 
			
		||||
    kSAI_Busy = 0x0U, /*!< SAI is busy */
 | 
			
		||||
    kSAI_Idle,        /*!< Transfer is done. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occured. */
 | 
			
		||||
    kSAI_Error        /*!< Transfer error occurred. */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*! @brief Typedef for sai tx interrupt handler. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,7 +75,7 @@ void TMR_Delay(mxc_tmr_regs_t* tmr, unsigned long us);
 | 
			
		|||
void TMR_TO_Start(mxc_tmr_regs_t* tmr, unsigned long us);
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief   Check if the timeout has occured.
 | 
			
		||||
 * @brief   Check if the timeout has occurred.
 | 
			
		||||
 * @param   tmr     TMR module to operate on
 | 
			
		||||
 * @returns E_NO_ERROR if the timeout has not occurred, E_TIME_OUT if it has.
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue