Updated L3GD20 related files.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9698 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
7360b021a5
commit
724eef04f3
|
@ -291,6 +291,11 @@
|
||||||
#if L3GD20_USE_SPI && !HAL_USE_SPI
|
#if L3GD20_USE_SPI && !HAL_USE_SPI
|
||||||
#error "L3GD20_USE_SPI requires HAL_USE_SPI"
|
#error "L3GD20_USE_SPI requires HAL_USE_SPI"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//TODO: add I2C support.
|
||||||
|
#if L3GD20_USE_I2C
|
||||||
|
#error "L3GD20 over I2C still not supported"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if L3GD20_USE_I2C && !HAL_USE_I2C
|
#if L3GD20_USE_I2C && !HAL_USE_I2C
|
||||||
#error "L3GD20_USE_I2C requires HAL_USE_I2C"
|
#error "L3GD20_USE_I2C requires HAL_USE_I2C"
|
||||||
|
|
|
@ -79,10 +79,10 @@ static L3GD20Config l3gd20cfg = {
|
||||||
#define CHPRINTF_USE_ANSI_CODE TRUE
|
#define CHPRINTF_USE_ANSI_CODE TRUE
|
||||||
#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(2048)
|
#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;
|
(void)argv;
|
||||||
if (argc != 1) {
|
if (argc != 1) {
|
||||||
chprintf(chp, "Usage: get [raw|cooked]\r\n");
|
chprintf(chp, "Usage: read [raw|cooked]\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ static void cmd_get(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
chprintf(chp, "Usage: get [raw|cooked]\r\n");
|
chprintf(chp, "Usage: read [raw|cooked]\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ static void cmd_bias(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static const ShellCommand commands[] = {
|
static const ShellCommand commands[] = {
|
||||||
{"get", cmd_get},
|
{"read", cmd_read},
|
||||||
{"set", cmd_set},
|
{"set", cmd_set},
|
||||||
{"bias", cmd_bias},
|
{"bias", cmd_bias},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
|
|
|
@ -79,10 +79,10 @@ static L3GD20Config l3gd20cfg = {
|
||||||
#define CHPRINTF_USE_ANSI_CODE TRUE
|
#define CHPRINTF_USE_ANSI_CODE TRUE
|
||||||
#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(2048)
|
#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;
|
(void)argv;
|
||||||
if (argc != 1) {
|
if (argc != 1) {
|
||||||
chprintf(chp, "Usage: get [raw|cooked]\r\n");
|
chprintf(chp, "Usage: read [raw|cooked]\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ static void cmd_get(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
chprintf(chp, "Usage: get [raw|cooked]\r\n");
|
chprintf(chp, "Usage: read [raw|cooked]\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -211,7 +211,7 @@ static void cmd_bias(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static const ShellCommand commands[] = {
|
static const ShellCommand commands[] = {
|
||||||
{"get", cmd_get},
|
{"read", cmd_read},
|
||||||
{"set", cmd_set},
|
{"set", cmd_set},
|
||||||
{"bias", cmd_bias},
|
{"bias", cmd_bias},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
|
|
|
@ -78,10 +78,10 @@ static L3GD20Config l3gd20cfg = {
|
||||||
#define CHPRINTF_USE_ANSI_CODE TRUE
|
#define CHPRINTF_USE_ANSI_CODE TRUE
|
||||||
#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(2048)
|
#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;
|
(void)argv;
|
||||||
if (argc != 1) {
|
if (argc != 1) {
|
||||||
chprintf(chp, "Usage: get [raw|cooked]\r\n");
|
chprintf(chp, "Usage: read [raw|cooked]\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ static void cmd_get(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
chprintf(chp, "Usage: get [raw|cooked]\r\n");
|
chprintf(chp, "Usage: read [raw|cooked]\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ static void cmd_bias(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static const ShellCommand commands[] = {
|
static const ShellCommand commands[] = {
|
||||||
{"get", cmd_get},
|
{"read", cmd_read},
|
||||||
{"set", cmd_set},
|
{"set", cmd_set},
|
||||||
{"bias", cmd_bias},
|
{"bias", cmd_bias},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
|
|
Loading…
Reference in New Issue