diff --git a/cores/k210/HardwareSerial.cpp b/cores/k210/HardwareSerial.cpp index 94ef96e..871596a 100644 --- a/cores/k210/HardwareSerial.cpp +++ b/cores/k210/HardwareSerial.cpp @@ -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; @@ -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; } diff --git a/cores/k210/k210-hal/k210-hal-dma.c b/cores/k210/k210-hal/k210-hal-dma.c index 32f2e5a..34696e9 100644 --- a/cores/k210/k210-hal/k210-hal-dma.c +++ b/cores/k210/k210-hal/k210-hal-dma.c @@ -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; } diff --git a/cores/k210/k210-hal/k210-hal-tft-bus.c b/cores/k210/k210-hal/k210-hal-tft-bus.c index f768850..4241dca 100644 --- a/cores/k210/k210-hal/k210-hal-tft-bus.c +++ b/cores/k210/k210-hal/k210-hal-tft-bus.c @@ -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 { @@ -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, @@ -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; } @@ -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; diff --git a/cores/k210/k210-sdk/drivers/k210_aes.h b/cores/k210/k210-sdk/drivers/k210_aes.h index 55a0061..1e61091 100644 --- a/cores/k210/k210-sdk/drivers/k210_aes.h +++ b/cores/k210/k210-sdk/drivers/k210_aes.h @@ -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; diff --git a/docs/source/libraries/image.rst b/docs/source/libraries/image.rst index 0580314..0414e47 100644 --- a/docs/source/libraries/image.rst +++ b/docs/source/libraries/image.rst @@ -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`` 是否创建图像内存 diff --git a/libraries/Image/src/Image.cpp b/libraries/Image/src/Image.cpp index 2c25267..3f001be 100644 --- a/libraries/Image/src/Image.cpp +++ b/libraries/Image/src/Image.cpp @@ -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; @@ -1106,7 +1106,7 @@ namespace K210 (0x00 == img->h) || (0x00 == img->bpp)) { - LOG_E("Invaild image."); + LOG_E("Invalid image."); return -1; } diff --git a/libraries/Image/src/Image.h b/libraries/Image/src/Image.h index 3fbf73c..6bb5cfc 100644 --- a/libraries/Image/src/Image.h +++ b/libraries/Image/src/Image.h @@ -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 diff --git a/libraries/K210_8080/src/Bus8080.h b/libraries/K210_8080/src/Bus8080.h index 11da959..051147f 100644 --- a/libraries/K210_8080/src/Bus8080.h +++ b/libraries/K210_8080/src/Bus8080.h @@ -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 diff --git a/libraries/K210_AES/src/AES.cpp b/libraries/K210_AES/src/AES.cpp index 6bc9547..4788d84 100644 --- a/libraries/K210_AES/src/AES.cpp +++ b/libraries/K210_AES/src/AES.cpp @@ -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; diff --git a/libraries/K210_KPU/src/KPU.cpp b/libraries/K210_KPU/src/KPU.cpp index 41d07da..5147827 100644 --- a/libraries/K210_KPU/src/KPU.cpp +++ b/libraries/K210_KPU/src/KPU.cpp @@ -249,7 +249,7 @@ namespace K210 if(NULL == r8g8b8) { - LOG_E("invaild input"); + LOG_E("Invalid input"); return -1; } @@ -306,7 +306,7 @@ namespace K210 { if(IMAGE_FORMAT_R8G8B8 != img->format) { - LOG_E("Invaild image format"); + LOG_E("Invalid image format"); return -1; } @@ -351,7 +351,7 @@ namespace K210 { if((NULL == anchor) || (anchor_num % 2)) { - LOG_E("anchor invaild"); + LOG_E("anchor invalid"); return -1; } @@ -421,7 +421,7 @@ namespace K210 { if(IMAGE_FORMAT_R8G8B8 != img->format) { - LOG_E("Invaild image format"); + LOG_E("Invalid image format"); return -1; } diff --git a/libraries/SPI/src/SPI.cpp b/libraries/SPI/src/SPI.cpp index f51f328..b30bd8d 100644 --- a/libraries/SPI/src/SPI.cpp +++ b/libraries/SPI/src/SPI.cpp @@ -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; } @@ -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; } @@ -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; diff --git a/libraries/Wire/src/Wire.cpp b/libraries/Wire/src/Wire.cpp index b24d67f..4c45a7a 100644 --- a/libraries/Wire/src/Wire.cpp +++ b/libraries/Wire/src/Wire.cpp @@ -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; @@ -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; } @@ -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; } @@ -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; }