2011-07-24 13:44:35 +00:00
|
|
|
#include <sysinit.h>
|
|
|
|
|
|
|
|
#include "basic/basic.h"
|
|
|
|
|
|
|
|
#include "lcd/lcd.h"
|
|
|
|
#include "lcd/print.h"
|
|
|
|
#include "lcd/allfonts.h"
|
|
|
|
|
|
|
|
#include "filesystem/ff.h"
|
|
|
|
#include "filesystem/select.h"
|
|
|
|
#include "funk/nrf24l01p.h"
|
|
|
|
#include "usb/usbmsc.h"
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
/**************************************************************************/
|
|
|
|
|
|
|
|
void s_ticks(void) {
|
|
|
|
int dx=0;
|
|
|
|
int dy=8;
|
|
|
|
lcdClear();
|
|
|
|
dx=DoString(0,dy,"Ticks:");
|
|
|
|
dx=DoString(0,dy+16,"Qdepth:");
|
|
|
|
while ((getInputRaw())==BTN_NONE){
|
|
|
|
DoInt(0,dy+8,_timectr);
|
|
|
|
DoInt(dx,dy+16,(the_queue.qend-the_queue.qstart+MAXQENTRIES)%MAXQENTRIES);
|
|
|
|
lcdDisplay();
|
|
|
|
__asm volatile ("WFI");
|
|
|
|
};
|
|
|
|
dy+=16;
|
|
|
|
dx=DoString(0,dy,"Done.");
|
|
|
|
};
|
|
|
|
|
|
|
|
void b_one(void){
|
|
|
|
gpioSetValue (RB_LED2, 0);
|
2011-07-25 23:09:31 +00:00
|
|
|
delayms(100);
|
2011-07-24 13:44:35 +00:00
|
|
|
gpioSetValue (RB_LED2, 1);
|
2011-07-25 23:09:31 +00:00
|
|
|
delayms(1000);
|
2011-07-24 13:44:35 +00:00
|
|
|
gpioSetValue (RB_LED2, 0);
|
|
|
|
};
|
|
|
|
|
2011-07-25 23:09:31 +00:00
|
|
|
void push_q(void) {
|
|
|
|
push_queue(&b_one);
|
|
|
|
push_queue(&b_one);
|
|
|
|
push_queue(&b_one);
|
|
|
|
push_queue(&b_one);
|
|
|
|
push_queue(&b_one);
|
2011-07-24 13:44:35 +00:00
|
|
|
push_queue(&b_one);
|
|
|
|
};
|
|
|
|
|