Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
ca8d008a
Unverified
Commit
ca8d008a
authored
Apr 26, 2024
by
RoboSchmied
Committed by
GitHub
Apr 26, 2024
Browse files
Fix typos (#3645)
parent
b6c8a85f
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/driver/spi.c
View file @
ca8d008a
...
...
@@ -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_endian
n
ess
(
uint32
n
)
{
return
((
n
&
0xff
)
<<
24
)
|
((
n
&
0xff00
)
<<
8
)
|
...
...
@@ -248,10 +248,10 @@ 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_endian
n
ess
(
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_endian
n
ess
(
spi_buf
.
word
[
0
]);
}
shift
=
64
-
(
offset
&
0x1f
)
-
bitlen
;
...
...
@@ -259,9 +259,9 @@ void spi_mast_set_mosi(uint8 spi_no, uint16 offset, uint8 bitlen, uint32 data)
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_endian
n
ess
(
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_endian
n
ess
(
spi_buf
.
word
[
1
]));
return
;
}
...
...
@@ -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_endian
n
ess
(
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_endian
n
ess
(
spi_buf
.
word
[
0
]);
}
result
=
(
uint32
)(
spi_buf
.
dword
>>
(
64
-
((
offset
&
0x1f
)
+
bitlen
)));
...
...
app/include/lwip/def.h
View file @
ca8d008a
...
...
@@ -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 */
/* Endian
n
ess-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
...
...
app/lwip/core/ipv4/inet_chksum.c
View file @
ca8d008a
...
...
@@ -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 endian
n
ess is irrelevant (p3 RFC1071)
*/
static
u16_t
ICACHE_FLASH_ATTR
lwip_standard_chksum
(
void
*
dataptr
,
u16_t
len
)
...
...
app/mbedtls/library/aes.c
View file @
ca8d008a
...
...
@@ -1111,7 +1111,7 @@ int mbedtls_aes_crypt_cbc( mbedtls_aes_context *ctx,
#if defined(MBEDTLS_CIPHER_MODE_XTS)
/* Endianess with 64 bits values */
/* Endian
n
ess with 64 bits values */
#ifndef GET_UINT64_LE
#define GET_UINT64_LE(n,b,i) \
{ \
...
...
@@ -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 endian
n
ess and hence works correctly on both big and little
* endian machines.
*/
static
void
mbedtls_gf128mul_x_ble
(
unsigned
char
r
[
16
],
...
...
app/modules/struct.c
View file @
ca8d008a
...
...
@@ -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 endian
n
ess and alignment
*/
static
void
controloptions
(
lua_State
*
L
,
int
opt
,
const
char
**
fmt
,
Header
*
h
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment