#include <setupdat.h>
/* Change to support as many interfaces as you need. */
-BYTE altiface = 0;
+static BYTE altiface = 0;
-volatile WORD ledcounter = 0;
+static volatile WORD ledcounter = 0;
-volatile __bit dosud = FALSE;
-volatile __bit dosuspend = FALSE;
+static volatile __bit dosud = FALSE;
+static volatile __bit dosuspend = FALSE;
extern __code BYTE highspd_dscr;
extern __code BYTE fullspd_dscr;
* both channels and then we mask it out to only affect the channel currently
* requested.
*/
-BOOL set_voltage(BYTE channel, BYTE val)
+static BOOL set_voltage(BYTE channel, BYTE val)
{
BYTE bits, mask;
return TRUE;
}
-BOOL set_numchannels(BYTE numchannels)
+static BOOL set_numchannels(BYTE numchannels)
{
if (numchannels == 1 || numchannels == 2) {
BYTE fifocfg = 7 + numchannels;
return FALSE;
}
-void clear_fifo(void)
+static void clear_fifo(void)
{
GPIFABORT = 0xff;
SYNCDELAY3;
FIFORESET = 0;
}
-void stop_sampling(void)
+static void stop_sampling(void)
{
GPIFABORT = 0xff;
SYNCDELAY3;
INPKTEND = (altiface == 0) ? 6 : 2;
}
-void start_sampling(void)
+static void start_sampling(void)
{
int i;
PC1 = 0;
}
-void select_interface(BYTE alt)
+static void select_interface(BYTE alt)
{
const BYTE *pPacketSize = \
(USBCS & bmHSM ? &highspd_dscr : &fullspd_dscr)
}
}
-const struct samplerate_info {
+static const struct samplerate_info {
BYTE rate;
BYTE wait0;
BYTE wait1;
{ 10, 240, 239, 2, 0, 0x40, 0xca },
};
-BOOL set_samplerate(BYTE rate)
+static BOOL set_samplerate(BYTE rate)
{
BYTE i = 0;
return FALSE; /* Not handled by handlers. */
}
-void init(void)
+static void init(void)
{
EP4CFG = 0;
EP8CFG = 0;
select_interface(0);
}
-void main(void)
+static void main(void)
{
/* Save energy. */
SETCPUFREQ(CLK_12M);