[tuxdroid-svn] r1115 - in firmware/fuxusb/branches/usb_cleanup: . bootloader lib_mcu/uart/tools mod
Status: Beta
Brought to you by:
ks156
From: Paul_R <c2m...@c2...> - 2008-05-06 11:33:39
|
Author: Paul_R Date: 2008-05-06 13:33:40 +0200 (Tue, 06 May 2008) New Revision: 1115 Modified: firmware/fuxusb/branches/usb_cleanup/bootloader/bootloading.c firmware/fuxusb/branches/usb_cleanup/fuxusb.Uv2 firmware/fuxusb/branches/usb_cleanup/global.c firmware/fuxusb/branches/usb_cleanup/global.h firmware/fuxusb/branches/usb_cleanup/lib_mcu/uart/tools/c51_bdr.c firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo.c firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_mic.c firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_mic.h firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_spk.c firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_spk.h firmware/fuxusb/branches/usb_cleanup/modules/fifo_stt/fifo_stt.c firmware/fuxusb/branches/usb_cleanup/modules/fifo_stt/fifo_stt.h firmware/fuxusb/branches/usb_cleanup/spi/spi_lib.c firmware/fuxusb/branches/usb_cleanup/spi/spi_lib.h firmware/fuxusb/branches/usb_cleanup/spi/spi_task.c firmware/fuxusb/branches/usb_cleanup/spi/spi_task.h firmware/fuxusb/branches/usb_cleanup/usb/usb_endpoints.c firmware/fuxusb/branches/usb_cleanup/usb/usb_enum.c firmware/fuxusb/branches/usb_cleanup/usb/usb_task.c firmware/fuxusb/branches/usb_cleanup/usb/usb_task.h Log: * Replaced all unsigned int/char by uint16/8_t Modified: firmware/fuxusb/branches/usb_cleanup/bootloader/bootloading.c =================================================================== --- firmware/fuxusb/branches/usb_cleanup/bootloader/bootloading.c 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/bootloader/bootloading.c 2008-05-06 11:33:40 UTC (rev 1115) @@ -57,7 +57,7 @@ i2cSendDataLength = dataLength + 2; #ifdef BOOTLOAD_DEBUG { - unsigned char i; + uint8_t i; printf("I2C: Page 0x%BX%BX:\n", i2cSendData[0], i2cSendData[1]); for (i=2; i<i2cSendDataLength; i++) printf("%BX", i2cSendData[i]); Modified: firmware/fuxusb/branches/usb_cleanup/fuxusb.Uv2 =================================================================== --- firmware/fuxusb/branches/usb_cleanup/fuxusb.Uv2 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/fuxusb.Uv2 2008-05-06 11:33:40 UTC (rev 1115) @@ -55,7 +55,7 @@ EnvLib () EnvReg () OrgReg () - TgStat=0 + TgStat=9 OutDir (.\obj\) OutName (fuxusb.aof) GenApp=1 Modified: firmware/fuxusb/branches/usb_cleanup/global.c =================================================================== --- firmware/fuxusb/branches/usb_cleanup/global.c 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/global.c 2008-05-06 11:33:40 UTC (rev 1115) @@ -13,6 +13,7 @@ #include "global.h" #include "version.h" +#include "lib_c/stdint.h" /*_____ M A C R O S ________________________________________________________*/ @@ -29,23 +30,23 @@ //------------------------------------------------------- // USB Controler //------------------------------------------------------- -unsigned int usb_sof_counter; -unsigned char usb_configuration_nb; -bit usb_connected_Flag; +uint16_t usb_sof_counter; +uint8_t usb_configuration_nb; +bit usb_connected_Flag; -bit CMD_OUT_Bank_Nb; // To store the number of the Bank used for the CMD_OUT Endpoint -unsigned char CMD_IN_Bank_Nb; +bit CMD_OUT_Bank_Nb; // To store the number of the Bank used for the CMD_OUT Endpoint +uint8_t CMD_IN_Bank_Nb; -bit USB_ParserProcess_Permit_Flag; -bit USB_StatusProcess_Permit_Flag; -bit USB_Status_NewCmd_Flag; -bit USB_Bootloader_NewCmd_Flag; +bit USB_ParserProcess_Permit_Flag; +bit USB_StatusProcess_Permit_Flag; +bit USB_Status_NewCmd_Flag; +bit USB_Bootloader_NewCmd_Flag; //------------------------------------------------------- // I2C Controler //------------------------------------------------------- -unsigned char i2c_wait_counter = 0; -bit i2c_task_on_Flag; +uint8_t i2c_wait_counter = 0; +bit i2c_task_on_Flag; //------------------------------------------------------- // RF Controler @@ -59,11 +60,11 @@ //------------------------------------------------------- -bit RF_OFFLine_Back; -unsigned char RF_Status; -unsigned char RF_Status_Temp; +bit RF_OFFLine_Back; +uint8_t RF_Status; +uint8_t RF_Status_Temp; -unsigned int spi_watchdog_ctr; +uint16_t spi_watchdog_ctr; //------------------------------------------------------- // Tux Command and Status @@ -71,11 +72,11 @@ // From USB //------------------------------------------------------- -unsigned char USBCommand_ForDongle[65]; // For Dongle -unsigned char USBCommand_ForRF[65]; // For RF -unsigned char USBCommand_Ctr; // Store the number of byte sent by the LIBUSB -bit USBCommand_NewRequest_Flag; -unsigned char USBCommand_Header; // Needed to analyze the LIBUSB command : to RF or to I2C +uint8_t USBCommand_ForDongle[65]; // For Dongle +uint8_t USBCommand_ForRF[65]; // For RF +uint8_t USBCommand_Ctr; // Store the number of byte sent by the LIBUSB +bit USBCommand_NewRequest_Flag; +uint8_t USBCommand_Header; // Needed to analyze the LIBUSB command : to RF or to I2C #define LIBUSB_TUX_CMD_HDR 0 #define LIBUSB_DONGLE_CMD_HDR 1 Modified: firmware/fuxusb/branches/usb_cleanup/global.h =================================================================== --- firmware/fuxusb/branches/usb_cleanup/global.h 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/global.h 2008-05-06 11:33:40 UTC (rev 1115) @@ -14,12 +14,14 @@ #ifndef _GLOBAL_H_ #define _GLOBAL_H_ - +#include "lib_c/stdint.h" #include "common\api.h" #include "common\defines.h" #include "common\commands.h" /*_____ M A C R O S ________________________________________________________*/ +//#define uin8_t unsigned char +//#define uint16_t unsigned int /*_____ D E F I N I T I O N ________________________________________________*/ @@ -30,25 +32,25 @@ /*_____ D E C L A R A T I O N ______________________________________________*/ -extern unsigned int Sleep_Ctr; +extern uint16_t Sleep_Ctr; //------------------------------------------------------- // SPI Controler //------------------------------------------------------- extern bit spi_task_on_Flag; // = 1; // to turn ON the RF Task // = 0; // to turn OFF the RF Task -extern unsigned int spi_watchdog_ctr; +extern uint16_t spi_watchdog_ctr; #define SPI_WATCHDOG_MAX (6000) //------------------------------------------------------- // USB Controler //------------------------------------------------------- -extern unsigned int usb_sof_counter; -extern unsigned char usb_configuration_nb; +extern uint16_t usb_sof_counter; +extern uint8_t usb_configuration_nb; extern bit usb_connected_Flag; extern bit CMD_OUT_Bank_Nb;// To store the number of the Bank used for the CMD_OUT Endpoint -extern unsigned char CMD_IN_Bank_Nb; +extern uint8_t CMD_IN_Bank_Nb; extern bit USB_ParserProcess_Permit_Flag; extern bit USB_StatusProcess_Permit_Flag; @@ -59,7 +61,7 @@ // I2C Controler //------------------------------------------------------- -extern unsigned char i2c_wait_counter; +extern uint8_t i2c_wait_counter; extern bit i2c_task_on_Flag; //------------------------------------------------------- @@ -75,8 +77,8 @@ //------------------------------------------------------- extern bit RF_OFFLine_Back; -extern unsigned char RF_Status; -extern unsigned char RF_Status_Temp; +extern uint8_t RF_Status; +extern uint8_t RF_Status_Temp; //------------------------------------------------------- // Tux Command and Status @@ -86,12 +88,12 @@ // From USB //------------------------------------------------------- -extern unsigned char USBCommand_ForRF[]; // Store the USB Command -extern unsigned char USBCommand_ForDongle[]; // For Dongle -extern unsigned char USBCommand_Ctr; // Store the number of byte sent by the LIBUSB +extern uint8_t USBCommand_ForRF[]; // Store the USB Command +extern uint8_t USBCommand_ForDongle[]; // For Dongle +extern uint8_t USBCommand_Ctr; // Store the number of byte sent by the LIBUSB extern bit USBCommand_NewRequest_Flag; -extern unsigned char USBCommand_Header; // Needed to analyze the LIBUSB command : to RF or to I2C +extern uint8_t USBCommand_Header; // Needed to analyze the LIBUSB command : to RF or to I2C #define LIBUSB_TUX_CMD_HDR 0 Modified: firmware/fuxusb/branches/usb_cleanup/lib_mcu/uart/tools/c51_bdr.c =================================================================== --- firmware/fuxusb/branches/usb_cleanup/lib_mcu/uart/tools/c51_bdr.c 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/lib_mcu/uart/tools/c51_bdr.c 2008-05-06 11:33:40 UTC (rev 1115) @@ -57,7 +57,7 @@ 1843200, 0 }; -unsigned int fosc; +uint16_t fosc; int bdr (int prescaler, int max, int val) { Modified: firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo.c =================================================================== --- firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo.c 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo.c 2008-05-06 11:33:40 UTC (rev 1115) @@ -152,7 +152,7 @@ */ void adaptFifo(fifo_t *p) { - unsigned char fifoSize, index; + uint8_t fifoSize, index; /* check if outIdx equals FIFO_ADAPT_RATE or any of its mutliples */ index = p->outIdx & (FIFO_ADAPT_RATE*2 - 1); /* clear all bits above FIFO_ADAPT_RATE */ Modified: firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_mic.c =================================================================== --- firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_mic.c 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_mic.c 2008-05-06 11:33:40 UTC (rev 1115) @@ -25,12 +25,12 @@ #define FIFO_MIC_READY_VALUE 128 -unsigned char FifoTbl_MIC[FIFOTBL_MIC_MAX]; +uint8_t FifoTbl_MIC[FIFOTBL_MIC_MAX]; -unsigned char FifoIn_MIC_Idx; -unsigned char FifoOut_MIC_Idx; +uint8_t FifoIn_MIC_Idx; +uint8_t FifoOut_MIC_Idx; -unsigned char FifoOut_MIC_cmpt; +uint8_t FifoOut_MIC_cmpt; bit Fifoready_MIC = 0; @@ -54,7 +54,7 @@ // //------------------------------------------------------------------------ //#pragma ot(4, SPEED) -void FIFO_MIC_put (unsigned char Data) +void FIFO_MIC_put (uint8_t Data) { FifoOut_MIC_cmpt++; @@ -82,9 +82,9 @@ // //------------------------------------------------------------------------ //#pragma ot(4, SPEED) -unsigned char FIFO_MIC_get (void) +uint8_t FIFO_MIC_get (void) { - unsigned char Data; + uint8_t Data; if (FifoOut_MIC_cmpt == 0) Fifoready_MIC = 0; // FIFO empty Modified: firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_mic.h =================================================================== --- firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_mic.h 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_mic.h 2008-05-06 11:33:40 UTC (rev 1115) @@ -15,7 +15,7 @@ extern void FIFO_MIC_init (void); -extern void FIFO_MIC_put (unsigned char Data); -extern unsigned char FIFO_MIC_get (void); +extern void FIFO_MIC_put (uint8_t Data); +extern uint8_t FIFO_MIC_get (void); #endif /*_FIFO_MIC_H_*/ Modified: firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_spk.c =================================================================== --- firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_spk.c 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_spk.c 2008-05-06 11:33:40 UTC (rev 1115) @@ -16,15 +16,15 @@ #include "usb\usb_drv.h" -unsigned char FifoTbl_SPK[FIFOTBL_SPK_MAX]; +uint8_t FifoTbl_SPK[FIFOTBL_SPK_MAX]; -unsigned char FifoIn_SPK_Idx; -unsigned char FifoOut_SPK_Idx; +uint8_t FifoIn_SPK_Idx; +uint8_t FifoOut_SPK_Idx; -unsigned char FifoOut_SPK_cmpt; +uint8_t FifoOut_SPK_cmpt; bit Fifoready_SPK = 0; -unsigned char FIFO_i; +uint8_t FIFO_i; //------------------------------------------------------------------------ // Fifo Manager @@ -86,7 +86,7 @@ // //------------------------------------------------------------------------ //#pragma ot(4, SPEED) -void FIFO_SPK_put (unsigned char Data) +void FIFO_SPK_put (uint8_t Data) { Uchar FilterByte; FifoOut_SPK_cmpt++; @@ -117,9 +117,9 @@ // //------------------------------------------------------------------------ //#pragma ot(4, SPEED) -unsigned char FIFO_SPK_get (void) +uint8_t FIFO_SPK_get (void) { - unsigned char Data; + uint8_t Data; if (FifoOut_SPK_cmpt < FIFO_SPK_READY_VALUE_MIN) Fifoready_SPK = 0; // FIFO empty Modified: firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_spk.h =================================================================== --- firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_spk.h 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/modules/fifo/fifo_spk.h 2008-05-06 11:33:40 UTC (rev 1115) @@ -21,20 +21,20 @@ #define FIFO_SPK_READY_VALUE_MAX 32 #define FIFO_SPK_READY_VALUE_MIN 16 -extern unsigned char FifoTbl_SPK[FIFOTBL_SPK_MAX]; +extern uint8_t FifoTbl_SPK[FIFOTBL_SPK_MAX]; -extern unsigned char FifoIn_SPK_Idx; -extern unsigned char FifoOut_SPK_Idx; +extern uint8_t FifoIn_SPK_Idx; +extern uint8_t FifoOut_SPK_Idx; -extern unsigned char FifoOut_SPK_cmpt; +extern uint8_t FifoOut_SPK_cmpt; extern bit Fifoready_SPK; -extern unsigned char FIFO_i; +extern uint8_t FIFO_i; extern void FIFO_SPK_init (void); -extern void FIFO_SPK_put (unsigned char Data); +extern void FIFO_SPK_put (uint8_t Data); extern void FIFO_SPK_put8 (void); -extern unsigned char FIFO_SPK_get (void); +extern uint8_t FIFO_SPK_get (void); #endif /* _FIFO_SPK_H_*/ Modified: firmware/fuxusb/branches/usb_cleanup/modules/fifo_stt/fifo_stt.c =================================================================== --- firmware/fuxusb/branches/usb_cleanup/modules/fifo_stt/fifo_stt.c 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/modules/fifo_stt/fifo_stt.c 2008-05-06 11:33:40 UTC (rev 1115) @@ -16,12 +16,12 @@ #include "usb\usb_drv.h" -unsigned char FifoTbl_Stt[FIFOTBL_STT_MAX]; +uint8_t FifoTbl_Stt[FIFOTBL_STT_MAX]; -unsigned char FifoIn_STT_Idx; -unsigned char FifoOut_STT_Idx; +uint8_t FifoIn_STT_Idx; +uint8_t FifoOut_STT_Idx; -unsigned char FifoOut_STT_cmpt; +uint8_t FifoOut_STT_cmpt; bit FifoOverLoad_STT = 0; @@ -30,7 +30,7 @@ // Fifo_isFull // //------------------------------------------------------------------------ -unsigned char FIFO_isFull() +uint8_t FIFO_isFull() { return (FifoOverLoad_STT); @@ -67,7 +67,7 @@ // //------------------------------------------------------------------------ //#pragma ot(4, SPEED) -void FIFO_STT_put (unsigned char Data) +void FIFO_STT_put (uint8_t Data) { if(FifoOverLoad_STT) { @@ -89,9 +89,9 @@ // //------------------------------------------------------------------------ //#pragma ot(4, SPEED) -unsigned char FIFO_STT_get (void) +uint8_t FIFO_STT_get (void) { - unsigned char Data; + uint8_t Data; Data = FifoTbl_STT[FifoOut_STT_Idx]; FifoOut_STT_Idx++; Modified: firmware/fuxusb/branches/usb_cleanup/modules/fifo_stt/fifo_stt.h =================================================================== --- firmware/fuxusb/branches/usb_cleanup/modules/fifo_stt/fifo_stt.h 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/modules/fifo_stt/fifo_stt.h 2008-05-06 11:33:40 UTC (rev 1115) @@ -19,19 +19,19 @@ -extern unsigned char FifoTbl_STT[FIFOTBL_STT_MAX]; +extern uint8_t FifoTbl_STT[FIFOTBL_STT_MAX]; -extern unsigned char FifoIn_STT_Idx; -extern unsigned char FifoOut_STT_Idx; +extern uint8_t FifoIn_STT_Idx; +extern uint8_t FifoOut_STT_Idx; -extern unsigned char FifoOut_STT_cmpt; +extern uint8_t FifoOut_STT_cmpt; extern bit FifoOverLoad_STT; -extern unsigned char FIFO_isFull(void); +extern uint8_t FIFO_isFull(void); extern void FIFO_STT_flush (void); extern void FIFO_STT_init (void); -extern void FIFO_STT_put (unsigned char Data); -extern unsigned char FIFO_STT_get (void); +extern void FIFO_STT_put (uint8_t Data); +extern uint8_t FIFO_STT_get (void); #endif /*_FIFO_STT_H_*/ Modified: firmware/fuxusb/branches/usb_cleanup/spi/spi_lib.c =================================================================== --- firmware/fuxusb/branches/usb_cleanup/spi/spi_lib.c 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/spi/spi_lib.c 2008-05-06 11:33:40 UTC (rev 1115) @@ -44,7 +44,7 @@ *****************************************************************************/ -unsigned char spi_SendByte(Uchar Data) +uint8_t spi_SendByte(Uchar Data) { SPDAT = Data; while(!(SPSTA&0x80)); Modified: firmware/fuxusb/branches/usb_cleanup/spi/spi_lib.h =================================================================== --- firmware/fuxusb/branches/usb_cleanup/spi/spi_lib.h 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/spi/spi_lib.h 2008-05-06 11:33:40 UTC (rev 1115) @@ -26,6 +26,6 @@ /*_____ P R O T O T Y P E S ____________________________________________________________*/ extern void spi_init(void); -extern unsigned char spi_SendByte(Uchar Data); +extern uint8_t spi_SendByte(Uchar Data); #endif Modified: firmware/fuxusb/branches/usb_cleanup/spi/spi_task.c =================================================================== --- firmware/fuxusb/branches/usb_cleanup/spi/spi_task.c 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/spi/spi_task.c 2008-05-06 11:33:40 UTC (rev 1115) @@ -31,16 +31,16 @@ data STM_SPI_MASTER_SLAVE_TYPE spi_slave; data STM_SPI_SLAVE_MASTER_TYPE spi_master; -data unsigned char spi_slave_config; -data unsigned char spi_master_config; -data unsigned char spi_count; -data unsigned char spi_lenght_data; +data uint8_t spi_slave_config; +data uint8_t spi_master_config; +data uint8_t spi_count; +data uint8_t spi_lenght_data; bit spi_enable = 1; bit spi_ready = 0; bit spi_Start_Flag = 0; -unsigned char spi_TestCtr ; // Debug +uint8_t spi_TestCtr ; // Debug /*F************************************************************************** @@ -151,10 +151,10 @@ void spi_task(void) { - data unsigned char Spi_Overflow_Ctr; + data uint8_t Spi_Overflow_Ctr; uint8_t i; - data unsigned char received_status[4]; - data unsigned char received_data[34]; + data uint8_t received_status[4]; + data uint8_t received_data[34]; Cpu_reset=1; if(spi_task_on_Flag) { Modified: firmware/fuxusb/branches/usb_cleanup/spi/spi_task.h =================================================================== --- firmware/fuxusb/branches/usb_cleanup/spi/spi_task.h 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/spi/spi_task.h 2008-05-06 11:33:40 UTC (rev 1115) @@ -31,16 +31,16 @@ extern data STM_SPI_MASTER_SLAVE_TYPE spi_slave; typedef enum {HEADERM, PUT_SOUND_FIFO, READ_COMMAND} STM_SPI_SLAVE_MASTER_TYPE; extern data STM_SPI_SLAVE_MASTER_TYPE spi_master; -extern data unsigned char spi_slave_config; -extern data unsigned char spi_master_config; -extern data unsigned char spi_count; -extern data unsigned char spi_lenght_data; +extern data uint8_t spi_slave_config; +extern data uint8_t spi_master_config; +extern data uint8_t spi_count; +extern data uint8_t spi_lenght_data; extern bit spi_enable ; extern bit spi_ready ; extern bit spi_Start_Flag ; -extern unsigned char spi_TestCtr ; // Debug +extern uint8_t spi_TestCtr ; // Debug /*_____ D E C L A R A T I O N ______________________________________________*/ void spi_task_init (void); Modified: firmware/fuxusb/branches/usb_cleanup/usb/usb_endpoints.c =================================================================== --- firmware/fuxusb/branches/usb_cleanup/usb/usb_endpoints.c 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/usb/usb_endpoints.c 2008-05-06 11:33:40 UTC (rev 1115) @@ -18,7 +18,7 @@ static void ep_spk(void); static void ep_tts(void); static void ep_mic(void); -static void tux_command_parser (unsigned char* commands, unsigned char data_length); +static void tux_command_parser (uint8_t * commands, uint8_t data_length); static void usb_command_parser(void); void endpoints_ctr(void) @@ -233,9 +233,9 @@ /** * Parse generic tux commands and process those addressed to the dongle. */ -static void tux_command_parser (unsigned char* commands, unsigned char data_length) +static void tux_command_parser (uint8_t * commands, uint8_t data_length) { - unsigned char i = 0; + uint8_t i = 0; while (data_length > i) { Modified: firmware/fuxusb/branches/usb_cleanup/usb/usb_enum.c =================================================================== --- firmware/fuxusb/branches/usb_cleanup/usb/usb_enum.c 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/usb/usb_enum.c 2008-05-06 11:33:40 UTC (rev 1115) @@ -1059,11 +1059,11 @@ *****************************************************************************/ void usb_set_interface (void) { - unsigned char LAlternateSetting; - unsigned char HAlternateSetting; + uint8_t LAlternateSetting; + uint8_t HAlternateSetting; - unsigned char Linterface_number; - unsigned char Hinterface_number; + uint8_t Linterface_number; + uint8_t Hinterface_number; LAlternateSetting = Usb_read_byte(); /* read the conf. num. in wValue */ HAlternateSetting = Usb_read_byte(); /* read the conf. num. in wValue */ @@ -1378,11 +1378,11 @@ *****************************************************************************/ void usb_get_current (void) { - unsigned char LwValue = Usb_read_byte(); - unsigned char HwValue = Usb_read_byte(); + uint8_t LwValue = Usb_read_byte(); + uint8_t HwValue = Usb_read_byte(); - unsigned char LwIndex = Usb_read_byte(); - unsigned char HwIndex = Usb_read_byte(); + uint8_t LwIndex = Usb_read_byte(); + uint8_t HwIndex = Usb_read_byte(); Usb_clear_rx_setup(); Usb_set_DIR(); @@ -1418,11 +1418,11 @@ void usb_get_min (void) { - unsigned char LwValue = Usb_read_byte(); - unsigned char HwValue = Usb_read_byte(); + uint8_t LwValue = Usb_read_byte(); + uint8_t HwValue = Usb_read_byte(); - unsigned char LwIndex = Usb_read_byte(); - unsigned char HwIndex = Usb_read_byte(); + uint8_t LwIndex = Usb_read_byte(); + uint8_t HwIndex = Usb_read_byte(); Usb_clear_rx_setup(); Usb_set_DIR(); @@ -1444,11 +1444,11 @@ void usb_get_max (void) { - unsigned char LwValue = Usb_read_byte(); - unsigned char HwValue = Usb_read_byte(); + uint8_t LwValue = Usb_read_byte(); + uint8_t HwValue = Usb_read_byte(); - unsigned char LwIndex = Usb_read_byte(); - unsigned char HwIndex = Usb_read_byte(); + uint8_t LwIndex = Usb_read_byte(); + uint8_t HwIndex = Usb_read_byte(); Usb_clear_rx_setup(); Usb_set_DIR(); @@ -1470,11 +1470,11 @@ void usb_get_res (void) { - unsigned char LwValue = Usb_read_byte(); - unsigned char HwValue = Usb_read_byte(); + uint8_t LwValue = Usb_read_byte(); + uint8_t HwValue = Usb_read_byte(); - unsigned char LwIndex = Usb_read_byte(); - unsigned char HwIndex = Usb_read_byte(); + uint8_t LwIndex = Usb_read_byte(); + uint8_t HwIndex = Usb_read_byte(); Usb_clear_rx_setup(); Usb_set_DIR(); @@ -1513,11 +1513,11 @@ *****************************************************************************/ void usb_set_current (void) { - unsigned char LwValue = Usb_read_byte(); - unsigned char HwValue = Usb_read_byte(); + uint8_t LwValue = Usb_read_byte(); + uint8_t HwValue = Usb_read_byte(); - unsigned char LwIndex = Usb_read_byte(); - unsigned char HwIndex = Usb_read_byte(); + uint8_t LwIndex = Usb_read_byte(); + uint8_t HwIndex = Usb_read_byte(); Usb_clear_DIR(); Usb_clear_rx_setup(); @@ -1548,11 +1548,11 @@ void usb_set_min (void) { - unsigned char LwValue = Usb_read_byte(); - unsigned char HwValue = Usb_read_byte(); + uint8_t LwValue = Usb_read_byte(); + uint8_t HwValue = Usb_read_byte(); - unsigned char LwIndex = Usb_read_byte(); - unsigned char HwIndex = Usb_read_byte(); + uint8_t LwIndex = Usb_read_byte(); + uint8_t HwIndex = Usb_read_byte(); Usb_clear_DIR(); Usb_clear_rx_setup(); @@ -1570,11 +1570,11 @@ void usb_set_max (void) { - unsigned char LwValue = Usb_read_byte(); - unsigned char HwValue = Usb_read_byte(); + uint8_t LwValue = Usb_read_byte(); + uint8_t HwValue = Usb_read_byte(); - unsigned char LwIndex = Usb_read_byte(); - unsigned char HwIndex = Usb_read_byte(); + uint8_t LwIndex = Usb_read_byte(); + uint8_t HwIndex = Usb_read_byte(); Usb_clear_DIR(); Usb_clear_rx_setup(); @@ -1592,11 +1592,11 @@ void usb_set_res (void) { - unsigned char LwValue = Usb_read_byte(); - unsigned char HwValue = Usb_read_byte(); + uint8_t LwValue = Usb_read_byte(); + uint8_t HwValue = Usb_read_byte(); - unsigned char LwIndex = Usb_read_byte(); - unsigned char HwIndex = Usb_read_byte(); + uint8_t LwIndex = Usb_read_byte(); + uint8_t HwIndex = Usb_read_byte(); Usb_clear_DIR(); Usb_clear_rx_setup(); Modified: firmware/fuxusb/branches/usb_cleanup/usb/usb_task.c =================================================================== --- firmware/fuxusb/branches/usb_cleanup/usb/usb_task.c 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/usb/usb_task.c 2008-05-06 11:33:40 UTC (rev 1115) @@ -34,8 +34,8 @@ void data_to_send(void); /*_____ D E C L A R A T I O N ______________________________________________*/ #if (PONG_CHECK) -unsigned char pong_received; /* value of the pong received from the sound cpu */ -unsigned char pong_missed; /* counting the pong missed on the SPI */ +uint8_t pong_received; /* value of the pong received from the sound cpu */ +uint8_t pong_missed; /* counting the pong missed on the SPI */ #endif bit EP_AUDIOIN_Loaded = 0; @@ -48,10 +48,10 @@ fifo_t statusBuf; fifo_t *statusFifo = &statusBuf; -data unsigned char received_status[4]; -data unsigned char received_data[34]; -data unsigned char Sample8; -data unsigned char Spi_Overflow_Ctr; +data uint8_t received_status[4]; +data uint8_t received_data[34]; +data uint8_t Sample8; +data uint8_t Spi_Overflow_Ctr; /*F************************************************************************** * NAME: usb_task_init Modified: firmware/fuxusb/branches/usb_cleanup/usb/usb_task.h =================================================================== --- firmware/fuxusb/branches/usb_cleanup/usb/usb_task.h 2008-05-06 10:08:37 UTC (rev 1114) +++ firmware/fuxusb/branches/usb_cleanup/usb/usb_task.h 2008-05-06 11:33:40 UTC (rev 1115) @@ -11,6 +11,7 @@ #ifndef _USB_TASK_H_ #define _USB_TASK_H_ #include "config.h" +#include "lib_c/stdint.h" /*_____ I N C L U D E S ____________________________________________________*/ |