From 73a8c65ec902fd05638762a6a646cd4caa7beb05 Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Nihei Date: Wed, 5 May 2021 15:39:01 -0300 Subject: [PATCH] system/spi: Adopt CPHA as the abbreviation for clock phase --- system/spi/Kconfig | 8 ++++---- system/spi/README.md | 16 ++++++++-------- system/spi/spitool.h | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/system/spi/Kconfig b/system/spi/Kconfig index cbd6a575f..3b2ecff6c 100644 --- a/system/spi/Kconfig +++ b/system/spi/Kconfig @@ -61,10 +61,10 @@ config SPITOOL_DEFMODE default 0 ---help--- Default SPI mode, where; - 0 = CPOL=0, CHPHA=0 - 1 = CPOL=0, CHPHA=1 - 2 = CPOL=1, CHPHA=0 - 3 = CPOL=1, CHPHA=1 + 0 = CPOL=0, CPHA=0 + 1 = CPOL=0, CPHA=1 + 2 = CPOL=1, CPHA=0 + 3 = CPOL=1, CPHA=1 config SPITOOL_DEFWIDTH int "SPI Bit width" diff --git a/system/spi/README.md b/system/spi/README.md index 17c7b679c..2e6e3c5af 100644 --- a/system/spi/README.md +++ b/system/spi/README.md @@ -39,10 +39,10 @@ The SPI tool is designed to be implemented as a NuttShell (NSH) add-on. Read the - `CONFIG_SPITOOL_DEFFREQ` – Default frequency (default: `40000000`). - `CONFIG_SPITOOL_DEFMODE` – Default mode, where ``` - 0 = CPOL=0, CHPHA=0 - 1 = CPOL=0, CHPHA=1 - 2 = CPOL=1, CHPHA=0 - 3 = CPOL=1, CHPHA=1 + 0 = CPOL=0, CPHA=0 + 1 = CPOL=0, CPHA=1 + 2 = CPOL=1, CPHA=0 + 3 = CPOL=1, CPHA=1 ``` - `CONFIG_SPITOOL_DEFWIDTH` – Default bit width (default `8`). - `CONFIG_SPITOOL_DEFWORDS` – Default number of words to exchange (default `1`). @@ -159,10 +159,10 @@ NSH scripts to execute a longer, more complex series of SPI commands. Which of the available SPI modes is to be used. Options are; ``` - 0 = CPOL=0, CHPHA=0 - 1 = CPOL=0, CHPHA=1 - 2 = CPOL=1, CHPHA=0 - 3 = CPOL=1, CHPHA=1 + 0 = CPOL=0, CPHA=0 + 1 = CPOL=0, CPHA=1 + 2 = CPOL=1, CPHA=0 + 3 = CPOL=1, CPHA=1 ``` - `[-u udelay]` Delay after transfer in uS. Default: `0` diff --git a/system/spi/spitool.h b/system/spi/spitool.h index e545cb65c..74b5c9c6b 100644 --- a/system/spi/spitool.h +++ b/system/spi/spitool.h @@ -65,10 +65,10 @@ * (default 3) * CONFIG_SPITOOL_DEFFREQ - Default frequency (default: 40000000) * CONFIG_SPITOOL_DEFMODE - Default mode, where; - * 0 = CPOL=0, CHPHA=0 - * 1 = CPOL=0, CHPHA=1 - * 2 = CPOL=1, CHPHA=0 - * 3 = CPOL=1, CHPHA=1 + * 0 = CPOL=0, CPHA=0 + * 1 = CPOL=0, CPHA=1 + * 2 = CPOL=1, CPHA=0 + * 3 = CPOL=1, CPHA=1 * CONFIG_SPITOOL_DEFWIDTH - Default bit width (default 8) * CONFIG_SPITOOL_DEFWORDS - Default number of words to exchange * (default 1) @@ -87,7 +87,7 @@ #endif #ifndef CONFIG_SPITOOL_DEFMODE -#define CONFIG_SPITOOL_DEFMODE 0 /* CPOL=0, CHPHA=0 */ +#define CONFIG_SPITOOL_DEFMODE 0 /* CPOL=0, CPHA=0 */ #endif #ifndef CONFIG_SPITOOL_DEFWIDTH