Skip to content

Commit

Permalink
invalid typo (#13)
Browse files Browse the repository at this point in the history
* invalid typo

* more

* update
  • Loading branch information
dimitre authored Jun 17, 2024
1 parent 6759e9f commit 70b4995
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions cores/k210/HardwareSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ _rxPin(-1),
_txPin(-1)
{
if(uartNum >= /* UART_DEVICE_MAX */ 3) {
LOG_E("HardwareSerial Invaild uart_num %d\n", uartNum);
LOG_E("HardwareSerial Invalid uart_num %d\n", uartNum);
return;
}
_uartNum = uartNum;
Expand All @@ -40,7 +40,7 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
}

if (rxPin < 0 && txPin < 0) {
LOG_E("Invaild rxPin(%d) or txPin(%d)\n", rxPin, txPin);
LOG_E("Invalid rxPin(%d) or txPin(%d)\n", rxPin, txPin);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion cores/k210/k210-hal/k210-hal-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dmac_channel_number_t hal_dma_get_free_chn(void)
void hal_dma_releas_chn(dmac_channel_number_t chn)
{
if(chn >= DMA_CHN_NUM) {
LOG_E("release invaild chn(%d)", chn);
LOG_E("release invalid chn(%d)", chn);
return;
}

Expand Down
8 changes: 4 additions & 4 deletions cores/k210/k210-hal/k210-hal-tft-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ typedef enum {
MODE_DATA_HALF,
MODE_DATA_WORD,
MODE_DATA_FILL,
MODE_INVAILD = 255,
MODE_INVALID = 255,
} tft_bus_mod_t;

struct tft_bus_t {
Expand All @@ -38,7 +38,7 @@ static struct tft_bus_t tft_bus = {
.dcx_pin = -1,
.csx_pin = -1,
.clk_pin = -1,
.mode = MODE_INVAILD,
.mode = MODE_INVALID,
.cs = SPI_CHIP_SELECT_3,
.dc_gpio_func = TFT_DCX_GPIO_FUNC,
.freq = 10 * 1000 * 1000,
Expand Down Expand Up @@ -145,7 +145,7 @@ void hal_tft_fill_data(uint32_t *data_buf, uint32_t length)
void hal_tft_begin(int8_t clk_pin, int8_t cs_pin, int8_t dc_pin, uint32_t freq)
{
if((-1 == clk_pin) || (-1 == cs_pin) /* || (-1 == dc_pin) */) {
LOG_E("Invaild Pins");
LOG_E("Invalid Pins");
return;
}

Expand Down Expand Up @@ -186,7 +186,7 @@ void hal_tft_end(void)
tft_bus.dcx_pin = -1;
tft_bus.csx_pin = -1;
tft_bus.clk_pin = -1;
tft_bus.mode = MODE_INVAILD;
tft_bus.mode = MODE_INVALID;
tft_bus.cs = SPI_CHIP_SELECT_3;
tft_bus.dc_gpio_func = TFT_DCX_GPIO_FUNC;
tft_bus.freq = 10 * 1000 * 1000;
Expand Down
2 changes: 1 addition & 1 deletion cores/k210/k210-sdk/drivers/k210_aes.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ typedef enum _aes_kmode

typedef enum _aes_iv_len
{
IV_LEN_INVAILD = 0,
IV_LEN_INVALID = 0,
IV_LEN_96 = 12,
IV_LEN_128 = 16,
} aes_iv_len_t;
Expand Down
2 changes: 1 addition & 1 deletion docs/source/libraries/image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Image
IMAGE_FORMAT_RGB565, // bpp 2
IMAGE_FORMAT_RGB888, // bpp 3
IMAGE_FORMAT_R8G8B8, // bpp 3
IMAGE_FORMAT_INVAILD = 4,
IMAGE_FORMAT_INVALID = 4,
};
* ``create`` 是否创建图像内存
Expand Down
4 changes: 2 additions & 2 deletions libraries/Image/src/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace K210
w = 0;
h = 0;
bpp = 0;
format = IMAGE_FORMAT_INVAILD;
format = IMAGE_FORMAT_INVALID;
pixel = NULL;
user_buffer = false;
buffer_not_align = false;
Expand Down Expand Up @@ -1106,7 +1106,7 @@ namespace K210
(0x00 == img->h) ||
(0x00 == img->bpp))
{
LOG_E("Invaild image.");
LOG_E("Invalid image.");
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion libraries/Image/src/Image.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace K210
IMAGE_FORMAT_RGB565, // bpp 2
IMAGE_FORMAT_RGB888, // bpp 3
IMAGE_FORMAT_R8G8B8, // bpp 3
IMAGE_FORMAT_INVAILD = 4,
IMAGE_FORMAT_INVALID = 4,
};

typedef struct rectangle
Expand Down
2 changes: 1 addition & 1 deletion libraries/K210_8080/src/Bus8080.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Bus8080

/// @brief Control RESET Pin
/// @param valid Rst Vaild state
/// @param rst_ms Set Rst Invaild time
/// @param rst_ms Set Rst Invalid time
static void reset(PinStatus valid, int rst_ms);

/// @brief TFT Bus write command
Expand Down
6 changes: 3 additions & 3 deletions libraries/K210_AES/src/AES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ aes_iv_len_t AES::_ivLen = IV_LEN_128;

/* static */ int AES::begin(aes_cipher_mode_t mode, aes_kmode_t keyLen)
{
return begin(mode, keyLen, IV_LEN_INVAILD);
return begin(mode, keyLen, IV_LEN_INVALID);
}

/* static */ int AES::begin(aes_cipher_mode_t mode, aes_kmode_t keyLen, aes_iv_len_t ivLen)
{
if(AES_CIPHER_MAX <= mode) {
LOG_E("Invaild mode");
LOG_E("Invalid mode");
return -1;
}
_mode = mode;

if((AES_128 != keyLen) && (AES_192 != keyLen) && (AES_256 != keyLen)) {
LOG_E("Invaild keyLen");
LOG_E("Invalid keyLen");
return -1;
}
_keyLen = keyLen;
Expand Down
8 changes: 4 additions & 4 deletions libraries/K210_KPU/src/KPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ namespace K210

if(NULL == r8g8b8)
{
LOG_E("invaild input");
LOG_E("Invalid input");
return -1;
}

Expand Down Expand Up @@ -306,7 +306,7 @@ namespace K210
{
if(IMAGE_FORMAT_R8G8B8 != img->format)
{
LOG_E("Invaild image format");
LOG_E("Invalid image format");
return -1;
}

Expand Down Expand Up @@ -351,7 +351,7 @@ namespace K210
{
if((NULL == anchor) || (anchor_num % 2))
{
LOG_E("anchor invaild");
LOG_E("anchor invalid");
return -1;
}

Expand Down Expand Up @@ -421,7 +421,7 @@ namespace K210
{
if(IMAGE_FORMAT_R8G8B8 != img->format)
{
LOG_E("Invaild image format");
LOG_E("Invalid image format");
return -1;
}

Expand Down
6 changes: 3 additions & 3 deletions libraries/SPI/src/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void SPIClass::begin(int8_t sckPin, int8_t misoPin, int8_t mosiPin, int8_t csPin
}

if((-1 == sckPin) /* || (-1 == misoPin) */ || (-1 == mosiPin) /* || (-1 == csPin) */) {
LOG_E("Invaild Pins\n");
LOG_E("Invalid Pins\n");
return;
}

Expand All @@ -137,7 +137,7 @@ void SPIClass::begin(int8_t sckPin, int8_t misoPin, int8_t mosiPin, int8_t csPin
spi_chip_select_t chip_sel = spi_acquire_cs_func(_spiBus);

if(SPI_CHIP_SELECT_MAX <= chip_sel) {
LOG_E("Invaild cs_func %d\n", chip_sel);
LOG_E("Invalid cs_func %d\n", chip_sel);
failed = true;
goto _fail;
}
Expand All @@ -161,7 +161,7 @@ void SPIClass::begin(int8_t sckPin, int8_t misoPin, int8_t mosiPin, int8_t csPin
// } case SPI_BUS_3: {
// break;
} default: {
LOG_E("Invaild spi_bus %d\n", _spiBus);
LOG_E("Invalid spi_bus %d\n", _spiBus);
failed = true;
goto _fail;
break;
Expand Down
8 changes: 4 additions & 4 deletions libraries/Wire/src/Wire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ TwoWire::TwoWire(int busNum)
,user_onReceive(NULL)
{
if(busNum >= I2C_DEVICE_MAX) {
LOG_E("TwoWire Invaild busNum %d\n", busNum);
LOG_E("TwoWire Invalid busNum %d\n", busNum);
return;
}
_i2cNum = (i2c_device_number_t)busNum;
Expand All @@ -44,7 +44,7 @@ bool TwoWire::begin(int8_t sclPin, int8_t sdaPin, uint32_t frequency)
char _lock_name[32]; // real max len 8

if(_i2cNum >= I2C_DEVICE_MAX) {
LOG_E("TwoWire Invaild _i2cNum %d\n", _i2cNum);
LOG_E("TwoWire Invalid _i2cNum %d\n", _i2cNum);
started = false;
goto _end;
}
Expand All @@ -65,7 +65,7 @@ bool TwoWire::begin(int8_t sclPin, int8_t sdaPin, uint32_t frequency)
// _clockFreq = frequency;

if((sclPin < 0) || (sdaPin < 0)) {
LOG_E("Invaild sclPin(%d) or sdaPin(%d)\n", sclPin, sdaPin);
LOG_E("Invalid sclPin(%d) or sdaPin(%d)\n", sclPin, sdaPin);
return false;
}

Expand Down Expand Up @@ -129,7 +129,7 @@ bool TwoWire::begin(uint16_t address, int8_t sclPin, int8_t sdaPin, uint32_t fre
_slaveTransmitting = false;

if((sclPin < 0) || (sdaPin < 0)) {
LOG_E("Invaild sclPin(%d) or sdaPin(%d)\n", sclPin, sdaPin);
LOG_E("Invalid sclPin(%d) or sdaPin(%d)\n", sclPin, sdaPin);
return false;
}

Expand Down

0 comments on commit 70b4995

Please sign in to comment.