diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-07-10 17:58:39 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-07-10 17:58:39 +0000 |
commit | 724eef04f372d36f8c3893bbd4111a912a954d02 (patch) | |
tree | 2d6f5b189cdcbb2b6eef83f1cdfca67e76ccd9da | |
parent | 7360b021a53cd1b40f8aae6d126be2bc20e1678e (diff) | |
download | ChibiOS-724eef04f372d36f8c3893bbd4111a912a954d02.tar.gz ChibiOS-724eef04f372d36f8c3893bbd4111a912a954d02.tar.bz2 ChibiOS-724eef04f372d36f8c3893bbd4111a912a954d02.zip |
Updated L3GD20 related files.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9698 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/ex/ST/l3gd20.h | 5 | ||||
-rw-r--r-- | testhal/STM32/STM32F3xx/SPI-L3GD20/main.c | 8 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/SPI-L3GD20/main.c | 8 | ||||
-rw-r--r-- | testhal/STM32/STM32L4xx/SPI-L3GD20/main.c | 8 |
4 files changed, 17 insertions, 12 deletions
diff --git a/os/ex/ST/l3gd20.h b/os/ex/ST/l3gd20.h index 1b3f2993a..f2c3907da 100644 --- a/os/ex/ST/l3gd20.h +++ b/os/ex/ST/l3gd20.h @@ -291,6 +291,11 @@ #if L3GD20_USE_SPI && !HAL_USE_SPI #error "L3GD20_USE_SPI requires HAL_USE_SPI" #endif +
+//TODO: add I2C support.
+#if L3GD20_USE_I2C
+#error "L3GD20 over I2C still not supported"
+#endif
#if L3GD20_USE_I2C && !HAL_USE_I2C #error "L3GD20_USE_I2C requires HAL_USE_I2C" diff --git a/testhal/STM32/STM32F3xx/SPI-L3GD20/main.c b/testhal/STM32/STM32F3xx/SPI-L3GD20/main.c index 2f2199fc6..e76b62441 100644 --- a/testhal/STM32/STM32F3xx/SPI-L3GD20/main.c +++ b/testhal/STM32/STM32F3xx/SPI-L3GD20/main.c @@ -79,10 +79,10 @@ static L3GD20Config l3gd20cfg = { #define CHPRINTF_USE_ANSI_CODE TRUE
#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(2048)
-static void cmd_get(BaseSequentialStream *chp, int argc, char *argv[]) {
+static void cmd_read(BaseSequentialStream *chp, int argc, char *argv[]) {
(void)argv;
if (argc != 1) {
- chprintf(chp, "Usage: get [raw|cooked]\r\n");
+ chprintf(chp, "Usage: read [raw|cooked]\r\n");
return;
}
@@ -108,7 +108,7 @@ static void cmd_get(BaseSequentialStream *chp, int argc, char *argv[]) { }
}
else {
- chprintf(chp, "Usage: get [raw|cooked]\r\n");
+ chprintf(chp, "Usage: read [raw|cooked]\r\n");
return;
}
}
@@ -210,7 +210,7 @@ static void cmd_bias(BaseSequentialStream *chp, int argc, char *argv[]) { }
static const ShellCommand commands[] = {
- {"get", cmd_get},
+ {"read", cmd_read},
{"set", cmd_set},
{"bias", cmd_bias},
{NULL, NULL}
diff --git a/testhal/STM32/STM32F4xx/SPI-L3GD20/main.c b/testhal/STM32/STM32F4xx/SPI-L3GD20/main.c index e93e21a32..f43ffcbe8 100644 --- a/testhal/STM32/STM32F4xx/SPI-L3GD20/main.c +++ b/testhal/STM32/STM32F4xx/SPI-L3GD20/main.c @@ -79,10 +79,10 @@ static L3GD20Config l3gd20cfg = { #define CHPRINTF_USE_ANSI_CODE TRUE
#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(2048)
-static void cmd_get(BaseSequentialStream *chp, int argc, char *argv[]) {
+static void cmd_read(BaseSequentialStream *chp, int argc, char *argv[]) {
(void)argv;
if (argc != 1) {
- chprintf(chp, "Usage: get [raw|cooked]\r\n");
+ chprintf(chp, "Usage: read [raw|cooked]\r\n");
return;
}
@@ -108,7 +108,7 @@ static void cmd_get(BaseSequentialStream *chp, int argc, char *argv[]) { }
}
else {
- chprintf(chp, "Usage: get [raw|cooked]\r\n");
+ chprintf(chp, "Usage: read [raw|cooked]\r\n");
return;
}
}
@@ -211,7 +211,7 @@ static void cmd_bias(BaseSequentialStream *chp, int argc, char *argv[]) { }
static const ShellCommand commands[] = {
- {"get", cmd_get},
+ {"read", cmd_read},
{"set", cmd_set},
{"bias", cmd_bias},
{NULL, NULL}
diff --git a/testhal/STM32/STM32L4xx/SPI-L3GD20/main.c b/testhal/STM32/STM32L4xx/SPI-L3GD20/main.c index d2147de31..7a54839e0 100644 --- a/testhal/STM32/STM32L4xx/SPI-L3GD20/main.c +++ b/testhal/STM32/STM32L4xx/SPI-L3GD20/main.c @@ -78,10 +78,10 @@ static L3GD20Config l3gd20cfg = { #define CHPRINTF_USE_ANSI_CODE TRUE
#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(2048)
-static void cmd_get(BaseSequentialStream *chp, int argc, char *argv[]) {
+static void cmd_read(BaseSequentialStream *chp, int argc, char *argv[]) {
(void)argv;
if (argc != 1) {
- chprintf(chp, "Usage: get [raw|cooked]\r\n");
+ chprintf(chp, "Usage: read [raw|cooked]\r\n");
return;
}
@@ -107,7 +107,7 @@ static void cmd_get(BaseSequentialStream *chp, int argc, char *argv[]) { }
}
else {
- chprintf(chp, "Usage: get [raw|cooked]\r\n");
+ chprintf(chp, "Usage: read [raw|cooked]\r\n");
return;
}
}
@@ -207,7 +207,7 @@ static void cmd_bias(BaseSequentialStream *chp, int argc, char *argv[]) { }
static const ShellCommand commands[] = {
- {"get", cmd_get},
+ {"read", cmd_read},
{"set", cmd_set},
{"bias", cmd_bias},
{NULL, NULL}
|