Skip to content

Commit

Permalink
Fix typos (#3645)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoboSchmied committed Apr 26, 2024
1 parent b6c8a85 commit ca8d008
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions app/driver/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void spi_mast_blkget(uint8 spi_no, size_t bitlen, uint8 *data)
os_memcpy((void *)data, (void *)SPI_W0(spi_no), aligned_len);
}

static uint32 swap_endianess(uint32 n)
static uint32 swap_endianness(uint32 n)
{
return ((n & 0xff) << 24) |
((n & 0xff00) << 8) |
Expand Down Expand Up @@ -248,20 +248,20 @@ void spi_mast_set_mosi(uint8 spi_no, uint16 offset, uint8 bitlen, uint32 data)

// transfer Wn to buf
spi_buf.word[1] = READ_PERI_REG(SPI_W0(spi_no) + wn*4);
spi_buf.word[1] = swap_endianess(spi_buf.word[1]);
spi_buf.word[1] = swap_endianness(spi_buf.word[1]);
if (wn < 15) {
spi_buf.word[0] = READ_PERI_REG(SPI_W0(spi_no) + (wn+1)*4);
spi_buf.word[0] = swap_endianess(spi_buf.word[0]);
spi_buf.word[0] = swap_endianness(spi_buf.word[0]);
}

shift = 64 - (offset & 0x1f) - bitlen;
spi_buf.dword &= ~(((1ULL << bitlen)-1) << shift);
spi_buf.dword |= (uint64)data << shift;

if (wn < 15) {
WRITE_PERI_REG(SPI_W0(spi_no) + (wn+1)*4, swap_endianess(spi_buf.word[0]));
WRITE_PERI_REG(SPI_W0(spi_no) + (wn+1)*4, swap_endianness(spi_buf.word[0]));
}
WRITE_PERI_REG(SPI_W0(spi_no) + wn*4, swap_endianess(spi_buf.word[1]));
WRITE_PERI_REG(SPI_W0(spi_no) + wn*4, swap_endianness(spi_buf.word[1]));

return;
}
Expand Down Expand Up @@ -293,10 +293,10 @@ uint32 spi_mast_get_miso(uint8 spi_no, uint16 offset, uint8 bitlen)

// transfer Wn to buf
spi_buf.word[1] = READ_PERI_REG(SPI_W0(spi_no) + wn*4);
spi_buf.word[1] = swap_endianess(spi_buf.word[1]);
spi_buf.word[1] = swap_endianness(spi_buf.word[1]);
if (wn < 15) {
spi_buf.word[0] = READ_PERI_REG(SPI_W0(spi_no) + (wn+1)*4);
spi_buf.word[0] = swap_endianess(spi_buf.word[0]);
spi_buf.word[0] = swap_endianness(spi_buf.word[0]);
}

result = (uint32)(spi_buf.dword >> (64 - ((offset & 0x1f) + bitlen)));
Expand Down
2 changes: 1 addition & 1 deletion app/include/lwip/def.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extern "C" {
* 'a' is expected to be 'higher' (without overflow) than 'b'. */
#define LWIP_U32_DIFF(a, b) (((a) >= (b)) ? ((a) - (b)) : (((a) + ((b) ^ 0xFFFFFFFF) + 1)))

/* Endianess-optimized shifting of two u8_t to create one u16_t */
/* Endianness-optimized shifting of two u8_t to create one u16_t */
#if BYTE_ORDER == LITTLE_ENDIAN
#define LWIP_MAKE_U16(a, b) ((a << 8) | b)
#else
Expand Down
2 changes: 1 addition & 1 deletion app/lwip/core/ipv4/inet_chksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
* @return host order (!) lwip checksum (non-inverted Internet sum)
*
* @note accumulator size limits summable length to 64k
* @note host endianess is irrelevant (p3 RFC1071)
* @note host endianness is irrelevant (p3 RFC1071)
*/
static u16_t ICACHE_FLASH_ATTR
lwip_standard_chksum(void *dataptr, u16_t len)
Expand Down
4 changes: 2 additions & 2 deletions app/mbedtls/library/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ int mbedtls_aes_crypt_cbc( mbedtls_aes_context *ctx,

#if defined(MBEDTLS_CIPHER_MODE_XTS)

/* Endianess with 64 bits values */
/* Endianness with 64 bits values */
#ifndef GET_UINT64_LE
#define GET_UINT64_LE(n,b,i) \
{ \
Expand Down Expand Up @@ -1147,7 +1147,7 @@ typedef unsigned char mbedtls_be128[16];
*
* This function multiplies a field element by x in the polynomial field
* representation. It uses 64-bit word operations to gain speed but compensates
* for machine endianess and hence works correctly on both big and little
* for machine endianness and hence works correctly on both big and little
* endian machines.
*/
static void mbedtls_gf128mul_x_ble( unsigned char r[16],
Expand Down
2 changes: 1 addition & 1 deletion app/modules/struct.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static int gettoalign (size_t len, Header *h, int opt, size_t size) {


/*
** options to control endianess and alignment
** options to control endianness and alignment
*/
static void controloptions (lua_State *L, int opt, const char **fmt,
Header *h) {
Expand Down

0 comments on commit ca8d008

Please sign in to comment.