diff options
author | Christian Pointner <equinox@mur.at> | 2012-06-20 00:34:41 +0000 |
---|---|---|
committer | Christian Pointner <equinox@mur.at> | 2012-06-20 00:34:41 +0000 |
commit | bb53e1f4c48a062d822aecbe02694dc5959faa30 (patch) | |
tree | d93e3edc1ca4d807605ed5e75b8abe8949076974 /software/idm-test | |
parent | added check for CMD_READ (diff) |
adc sampling starts now via timer1 and ccp4 (less jitter)
some cleanup
git-svn-id: https://svn.spreadspace.org/mur.sat@541 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/idm-test')
-rw-r--r-- | software/idm-test/idm-test.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/software/idm-test/idm-test.c b/software/idm-test/idm-test.c index 89363e6..d725691 100644 --- a/software/idm-test/idm-test.c +++ b/software/idm-test/idm-test.c @@ -43,7 +43,7 @@ /* Global I/O Buffers: */
static RingBuffer_t SPItoUSB_Buffer;
-static uint8_t SPItoUSB_Buffer_Data[8];
+static uint8_t SPItoUSB_Buffer_Data[64];
/** LUFA CDC Class driver interface configuration and state information. This structure is
* passed to all CDC Class driver functions, so that multiple instances of the same class
@@ -132,18 +132,17 @@ void IDM_ReadData(void) _delay_us(100);
SPI_SendByte('r');
- _delay_us(50);
+ _delay_us(30);
uint8_t int_state = (INT_PIN & (1<<INT));
while(!int_state) {
uint8_t ReceivedByte = SPI_ReceiveByte();
RingBuffer_Insert(&SPItoUSB_Buffer, ReceivedByte);
if(RingBuffer_IsFull(&SPItoUSB_Buffer))
break;
- _delay_us(30);
+ _delay_us(25);
int_state = (INT_PIN & (1<<INT));
}
- _delay_us(100);
SPI_CS_PORT |= (1<<CS);
led_off();
}
|