git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3703 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2012-01-01 16:33:43 +00:00
parent b89c65bd8d
commit 12ba4080d6
1 changed files with 4 additions and 4 deletions

View File

@ -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);
}