aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-01-01 16:33:43 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-01-01 16:33:43 +0000
commit12ba4080d63fa25deaeff103514740136ab749f3 (patch)
treeb4c58d220f0108e0f51f738862394354ca5d91a9
parentb89c65bd8d6fa479b2e0a01e873fef2220ce563e (diff)
downloadChibiOS-12ba4080d63fa25deaeff103514740136ab749f3.tar.gz
ChibiOS-12ba4080d63fa25deaeff103514740136ab749f3.tar.bz2
ChibiOS-12ba4080d63fa25deaeff103514740136ab749f3.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3703 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--demos/ARMCM4-STM32F407-DISCOVERY/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/demos/ARMCM4-STM32F407-DISCOVERY/main.c b/demos/ARMCM4-STM32F407-DISCOVERY/main.c
index d8b72e3f7..9654bc226 100644
--- a/demos/ARMCM4-STM32F407-DISCOVERY/main.c
+++ b/demos/ARMCM4-STM32F407-DISCOVERY/main.c
@@ -266,14 +266,14 @@ int main(void) {
* driver 2.
*/
while (TRUE) {
- uint8_t x, y, z;
+ int8_t x, y, z;
if (palReadPad(GPIOA, GPIOA_BUTTON))
TestThread(&SD2);
- x = lis302dlReadRegister(&SPID1, LIS302DL_OUTX);
- y = lis302dlReadRegister(&SPID1, LIS302DL_OUTY);
- z = lis302dlReadRegister(&SPID1, LIS302DL_OUTZ);
+ x = (int8_t)lis302dlReadRegister(&SPID1, LIS302DL_OUTX);
+ y = (int8_t)lis302dlReadRegister(&SPID1, LIS302DL_OUTY);
+ z = (int8_t)lis302dlReadRegister(&SPID1, LIS302DL_OUTZ);
chprintf((BaseChannel *)&SD2, "%d, %d, %d\r\n", x, y, z);
chThdSleepMilliseconds(500);
}