Hello to all,
I am currently programming the ez430 rf2560, and it is my first delve into embedded systems using a RTOS. Overall, my project is to alter the accelerometer application to send raw three axis data over the spp so I can log it to a file and analyze it from there. My question is about the circular buffer. Specifically in the sdk_pl.c file the assignments:
buffer[0] = accl_x;
buffer[1] = (accl_x >> 8);
buffer[2] = accl_y;
buffer[3] = (accl_y >> 8);
I realize (unless i'm wrong) that this simply inserts the x axis data into the first byte of the array buffer, and then it gets shifted a whole register down. My question is why is it done this way? Is it the same as simply assigning buffer[1] = accl_x?
My second question is that since the accelerometer program only sends x and y axis data over spp, I realize I will have to alter the buffer length to make room for the z data (which is read from the accelerometer in halAccread() function, but never used). My question is, is the buffer to alter in the appl_sdk.c file (specifically the code below)?
static UCHAR appl_spp_data_buffer[4];
Thanks in advance for your help, I greatly appreciate it.