Skip to content

Fix typos in the files #6149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TESTS/mbedmicro-mbed/static_assert/test_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion TESTS/mbedmicro-mbed/static_assert/test_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion TESTS/netsocket/host_tests/udp_shotgun.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def handle(self):
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:
Expand Down
2 changes: 1 addition & 1 deletion TESTS/netsocket/tcp_packet_pressure/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion TESTS/netsocket/tcp_packet_pressure_parallel/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class PressureTest
}
}

// 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);
Expand Down
2 changes: 1 addition & 1 deletion TESTS/netsocket/udp_packet_pressure/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion TESTS/netsocket/udp_packet_pressure_parallel/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class PressureTest
}
}

// 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);
Expand Down
10 changes: 5 additions & 5 deletions drivers/Ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class Ethernet : private NonCopyable<Ethernet> {
*/
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.
Expand All @@ -110,7 +110,7 @@ class Ethernet : private NonCopyable<Ethernet> {
*/
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.
Expand All @@ -131,11 +131,11 @@ class Ethernet : private NonCopyable<Ethernet> {
*/
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
Expand Down
2 changes: 1 addition & 1 deletion drivers/I2C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions drivers/I2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ class I2C : private NonCopyable<I2C> {

/** 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
Expand Down
2 changes: 1 addition & 1 deletion drivers/RawSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class RawSerial: public SerialBase, private NonCopyable<RawSerial> {
*
* @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);

Expand Down
12 changes: 6 additions & 6 deletions drivers/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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) {
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions drivers/SPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class SPI : private NonCopyable<SPI> {

/** 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
Expand Down Expand Up @@ -121,7 +121,7 @@ class SPI : private NonCopyable<SPI> {

/** 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.
*
Expand Down Expand Up @@ -156,7 +156,7 @@ class SPI : private NonCopyable<SPI> {

/** 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
Expand Down
2 changes: 1 addition & 1 deletion drivers/SPISlave.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class SPISlave : private NonCopyable<SPISlave> {

/** 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
Expand Down
8 changes: 4 additions & 4 deletions drivers/SerialBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class SerialBase : private NonCopyable<SerialBase> {

/** 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
Expand All @@ -178,7 +178,7 @@ class SerialBase : private NonCopyable<SerialBase> {

/** 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
Expand All @@ -193,7 +193,7 @@ class SerialBase : private NonCopyable<SerialBase> {

/** 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
Expand All @@ -205,7 +205,7 @@ class SerialBase : private NonCopyable<SerialBase> {

/** 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
Expand Down
12 changes: 6 additions & 6 deletions events/Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class Event<void()> {
* 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 {
Expand Down Expand Up @@ -590,7 +590,7 @@ class Event<void(A0)> {
* 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 {
Expand Down Expand Up @@ -1008,7 +1008,7 @@ class Event<void(A0, A1)> {
* 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 {
Expand Down Expand Up @@ -1426,7 +1426,7 @@ class Event<void(A0, A1, A2)> {
* 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 {
Expand Down Expand Up @@ -1844,7 +1844,7 @@ class Event<void(A0, A1, A2, A3)> {
* 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 {
Expand Down Expand Up @@ -2262,7 +2262,7 @@ class Event<void(A0, A1, A2, A3, A4)> {
* 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 {
Expand Down
2 changes: 1 addition & 1 deletion events/EventQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class EventQueue : private mbed::NonCopyable<EventQueue> {
* 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
Expand Down
2 changes: 1 addition & 1 deletion events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions features/filesystem/bd/BlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ class BlockDevice
*/
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;
Expand Down
4 changes: 2 additions & 2 deletions features/filesystem/bd/ChainingBlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ class ChainingBlockDevice : public BlockDevice
*/
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;
Expand Down
4 changes: 2 additions & 2 deletions features/filesystem/bd/HeapBlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ class HeapBlockDevice : public BlockDevice
*/
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;

Expand Down
4 changes: 2 additions & 2 deletions features/filesystem/bd/MBRBlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ class MBRBlockDevice : public BlockDevice
*/
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;
Expand Down
4 changes: 2 additions & 2 deletions features/filesystem/bd/ProfilingBlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ class ProfilingBlockDevice : public BlockDevice
*/
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;
Expand Down
4 changes: 2 additions & 2 deletions features/filesystem/bd/SlicingBlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ class SlicingBlockDevice : public BlockDevice
*/
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;
Expand Down
4 changes: 2 additions & 2 deletions features/filesystem/littlefs/littlefs/lfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading