[tuxdroid-svn] r561 - in firmware: fuxrf/trunk tuxrf/trunk
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2007-10-01 12:02:57
|
Author: jaguarondi Date: 2007-10-01 14:02:54 +0200 (Mon, 01 Oct 2007) New Revision: 561 Modified: firmware/fuxrf/trunk/defines.h firmware/fuxrf/trunk/device.c firmware/fuxrf/trunk/init.c firmware/fuxrf/trunk/misc.c firmware/fuxrf/trunk/misc.h firmware/fuxrf/trunk/rf_ctrl.c firmware/fuxrf/trunk/rf_ctrl.h firmware/fuxrf/trunk/varis.c firmware/fuxrf/trunk/varis.h firmware/tuxrf/trunk/defines.h firmware/tuxrf/trunk/init.c firmware/tuxrf/trunk/misc.c firmware/tuxrf/trunk/misc.h firmware/tuxrf/trunk/prot.c firmware/tuxrf/trunk/rf_ctrl.c firmware/tuxrf/trunk/rf_ctrl.h firmware/tuxrf/trunk/varis.c firmware/tuxrf/trunk/varis.h Log: * Now using stdint types instead of custom defines. Modified: firmware/fuxrf/trunk/defines.h =================================================================== --- firmware/fuxrf/trunk/defines.h 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/fuxrf/trunk/defines.h 2007-10-01 12:02:54 UTC (rev 561) @@ -15,12 +15,6 @@ #define WIFI -// Type definition -#define uc_8 unsigned char -#define ui_16 unsigned int -#define sc_8 char -#define si_16 int - //------->rf_status-Defines<-------// #define WAIT_HOPPING 0x02 #define RXING 0x04 Modified: firmware/fuxrf/trunk/device.c =================================================================== --- firmware/fuxrf/trunk/device.c 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/fuxrf/trunk/device.c 2007-10-01 12:02:54 UTC (rev 561) @@ -31,7 +31,7 @@ }; /* Bootloader can be included with the program */ -#define BOOTLOADER 1 +#define BOOTLOADER 1 #if (BOOTLOADER) #include "bootloader.h" Modified: firmware/fuxrf/trunk/init.c =================================================================== --- firmware/fuxrf/trunk/init.c 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/fuxrf/trunk/init.c 2007-10-01 12:02:54 UTC (rev 561) @@ -56,12 +56,15 @@ output(UBRR0L, 0x05); //***********init-needed-peripherals***************// - SPCR = 0x40; // Slave + SPCR = 0x40; /* XXX what's this for? */// Slave SPSR = 0x00; - // Clear the SPI interrupt flag - asm volatile /* Clear the SPI interrupt flag */ - ("in __tmp_reg__, %0" "\n\t" "in __tmp_reg__, %1" - "\n\t"::"I" (_SFR_IO_ADDR(SPSR)), "I"(_SFR_IO_ADDR(SPDR))); + + /* Clear the SPI interrupt flag. XXX is this necessary at startup? */ + asm volatile + ("in __tmp_reg__, %0" "\n\t" + "in __tmp_reg__, %1" "\n\t" + ::"I" (_SFR_IO_ADDR(SPSR)), + "I"(_SFR_IO_ADDR(SPDR))); } //***************************************************************************** @@ -77,15 +80,15 @@ //***************************************************************************** void init_varis(void) { - uc_8 i; + uint8_t i; i = input(SPL); i ^= 0xFF; - extern ui_16 __bss_start; - extern ui_16 __stack; - uc_8 *ptr = (uc_8 *) & __bss_start; + extern uint16_t __bss_start; + extern uint16_t __stack; + uint8_t *ptr = (uint8_t *) & __bss_start; - while (ptr < (uc_8 *) & __stack - i) + while (ptr < (uint8_t *) & __stack - i) { /*sub because of returning of subroutine */ *ptr++ = 0; } // Reduce 26 bytes Modified: firmware/fuxrf/trunk/misc.c =================================================================== --- firmware/fuxrf/trunk/misc.c 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/fuxrf/trunk/misc.c 2007-10-01 12:02:54 UTC (rev 561) @@ -15,9 +15,9 @@ //* Date: 31.01.06 * //* Description: Generates a delay. T(delay) = val * 10us * //***************************************************************************** -void wait_n_10us(uc_8 val) +void wait_n_10us(uint8_t val) { - uc_8 i, j; + uint8_t i, j; i = val; for (i = 0; i < val; i++) @@ -43,9 +43,9 @@ //* Date: 31.01.06 * //* Description: Random value needed for system setup * //***************************************************************************** -uc_8 get_random(void) +uint8_t get_random(void) { - uc_8 i, random; + uint8_t i, random; //init of the global variable random, this is done by using the noise //output of the RF-Chip when settlet up for receive without having @@ -87,9 +87,9 @@ //* Date: 10.07.06 * //* Description: Random channel value needed for frequency hopping * //***************************************************************************** -uc_8 get_random_channel(void) +uint8_t get_random_channel(void) { - uc_8 value; + uint8_t value; while (1) { @@ -120,8 +120,8 @@ //***************************************************************************** void calc_checksum(unsigned char *pbuffer) { - uc_8 i, tmp; - uc_8 *ptr; + uint8_t i, tmp; + uint8_t *ptr; ptr = pbuffer + 16; // Get address of start of RF frame if (*(pbuffer + 16) & SMALLFRAME) Modified: firmware/fuxrf/trunk/misc.h =================================================================== --- firmware/fuxrf/trunk/misc.h 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/fuxrf/trunk/misc.h 2007-10-01 12:02:54 UTC (rev 561) @@ -3,9 +3,9 @@ #include "defines.h" -extern void wait_n_10us(uc_8 val); -extern uc_8 get_random(void); -extern uc_8 get_random_channel(void); +extern void wait_n_10us(uint8_t val); +extern uint8_t get_random(void); +extern uint8_t get_random_channel(void); extern void calc_checksum(unsigned char *pbuffer); #endif Modified: firmware/fuxrf/trunk/rf_ctrl.c =================================================================== --- firmware/fuxrf/trunk/rf_ctrl.c 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/fuxrf/trunk/rf_ctrl.c 2007-10-01 12:02:54 UTC (rev 561) @@ -272,10 +272,10 @@ //* Description: Programms the ATR2406 to the desired channel and to the * //* desired mode. * //***************************************************************************** -void init_atr2406(uc_8 channel, uc_8 mode) +void init_atr2406(uint8_t channel, uint8_t mode) { - uc_8 i, dat_l, dat_h, tmp; - ui_16 conf_data; + uint8_t i, dat_l, dat_h, tmp; + uint16_t conf_data; set_nole; clr_data; @@ -304,9 +304,9 @@ } } dat_l |= 0x80; - conf_data = (uc_8) dat_h; + conf_data = (uint8_t) dat_h; conf_data = conf_data << 8; - conf_data += (uc_8) dat_l; + conf_data += (uint8_t) dat_l; for (i = 0; i < 16; i++) // Shift out configuration word { clr_clock; @@ -383,8 +383,8 @@ //--------------------------C-Source Code-------------------------------------* //*SIGNAL (SIG_USART_DATA) * //*{ * -//* uc_8 *ptr; * -//* uc_8 data; * +//* uint8_t *ptr; * +//* uint8_t data; * //* ptr = prf_buffer_tx; * //* ptr += rf_tx_counter; * //* rf_tx_counter++; * @@ -541,8 +541,8 @@ //*---------------------C-Source Code-----------------------------------------* //*SIGNAL_NAKED (SIG_USART_RECV) * //*{ * -//* uc_8 data,tmp; * -//* uc_8 *ptr; * +//* uint8_t data,tmp; * +//* uint8_t *ptr; * //* if (rf_rx_state == 0x03) // Receive data * //* { * //* ptr = prf_buffer_rx + rf_rx_counter * Modified: firmware/fuxrf/trunk/rf_ctrl.h =================================================================== --- firmware/fuxrf/trunk/rf_ctrl.h 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/fuxrf/trunk/rf_ctrl.h 2007-10-01 12:02:54 UTC (rev 561) @@ -46,7 +46,7 @@ #include "defines.h" -extern void init_atr2406(uc_8 channel, uc_8 mode); +extern void init_atr2406(uint8_t channel, uint8_t mode); extern void pwr_up_atr2406(void); extern void pwr_dwn_atr2406(void); extern void start_rf_timer(void); Modified: firmware/fuxrf/trunk/varis.c =================================================================== --- firmware/fuxrf/trunk/varis.c 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/fuxrf/trunk/varis.c 2007-10-01 12:02:54 UTC (rev 561) @@ -1,72 +1,72 @@ #include "defines.h" // RF buffer -uc_8 rf_buffer_tx1[64] __attribute__ ((section(".buffer_tx1"))); // Buffer for storing the RF TX data -uc_8 rf_buffer_rx1[51] __attribute__ ((section(".buffer_rx1"))); // Buffer for storing the RF RX data -uc_8 rf_buffer_tx2[64] __attribute__ ((section(".buffer_tx2"))); // Buffer for storing the RF TX data -uc_8 rf_buffer_rx2[51] __attribute__ ((section(".buffer_rx2"))); // Buffer for storing the RF RX data +uint8_t rf_buffer_tx1[64] __attribute__ ((section(".buffer_tx1"))); // Buffer for storing the RF TX data +uint8_t rf_buffer_rx1[51] __attribute__ ((section(".buffer_rx1"))); // Buffer for storing the RF RX data +uint8_t rf_buffer_tx2[64] __attribute__ ((section(".buffer_tx2"))); // Buffer for storing the RF TX data +uint8_t rf_buffer_rx2[51] __attribute__ ((section(".buffer_rx2"))); // Buffer for storing the RF RX data -uc_8 *prf_buffer_rx __attribute__ ((section(".globals"))); -uc_8 *pspi_buffer_rx __attribute__ ((section(".globals"))); -uc_8 *prf_buffer_tx __attribute__ ((section(".globals"))); -uc_8 *pspi_buffer_tx __attribute__ ((section(".globals"))); +uint8_t *prf_buffer_rx __attribute__ ((section(".globals"))); +uint8_t *pspi_buffer_rx __attribute__ ((section(".globals"))); +uint8_t *prf_buffer_tx __attribute__ ((section(".globals"))); +uint8_t *pspi_buffer_tx __attribute__ ((section(".globals"))); // SOF buffer -uc_8 sof_ary[3] __attribute__ ((section(".sof"))); // Variable holding the 4 bytes start of frame +uint8_t sof_ary[3] __attribute__ ((section(".sof"))); // Variable holding the 4 bytes start of frame -uc_8 rf_header[4] __attribute__ ((section(".globals"))); // Rf header +uint8_t rf_header[4] __attribute__ ((section(".globals"))); // Rf header // RF variables -uc_8 rf_status __attribute__ ((section(".globals"))); // Satus of the RF - Task (Locked or Unlocked) -volatile uc_8 channel __attribute__ ((section(".globals"))); // Currently used RF - Channel -uc_8 rfStateCount __attribute__ ((section(".globals"))); // Counter for RF-IRQ-State machine -uc_8 tx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet TX -uc_8 rx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet RX -uc_8 rf_tx_counter __attribute__ ((section(".globals"))); // Counting the TX'ed bytes -uc_8 rf_rx_counter __attribute__ ((section(".globals"))); // Counting the RX'ed bytes -uc_8 rf_rx_state __attribute__ ((section(".globals"))); // State of the RX interrupt -uc_8 checksum __attribute__ ((section(".globals"))); // Checksum => 0x00 => okay -ui_16 ts __attribute__ ((section(".globals"))); // Timestamp for resynchronisation, if in synchronous mode -uc_8 rx_buffer_ready __attribute__ ((section(".globals"))); // Correct frame recieve flag -uc_8 gfilter __attribute__ ((section(".globals"))); // Gaussian filter value +uint8_t rf_status __attribute__ ((section(".globals"))); // Satus of the RF - Task (Locked or Unlocked) +volatile uint8_t channel __attribute__ ((section(".globals"))); // Currently used RF - Channel +uint8_t rfStateCount __attribute__ ((section(".globals"))); // Counter for RF-IRQ-State machine +uint8_t tx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet TX +uint8_t rx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet RX +uint8_t rf_tx_counter __attribute__ ((section(".globals"))); // Counting the TX'ed bytes +uint8_t rf_rx_counter __attribute__ ((section(".globals"))); // Counting the RX'ed bytes +uint8_t rf_rx_state __attribute__ ((section(".globals"))); // State of the RX interrupt +uint8_t checksum __attribute__ ((section(".globals"))); // Checksum => 0x00 => okay +uint16_t ts __attribute__ ((section(".globals"))); // Timestamp for resynchronisation, if in synchronous mode +uint8_t rx_buffer_ready __attribute__ ((section(".globals"))); // Correct frame recieve flag +uint8_t gfilter __attribute__ ((section(".globals"))); // Gaussian filter value // Adaptive FHSS -uc_8 frequencyTable[20] __attribute__ ((section(".globals"))); // Table with the scheme of frequency -uc_8 frequencyIndex __attribute__ ((section(".globals"))); // Pointer for the table of frequency -uc_8 FHAState __attribute__ ((section(".globals"))); // Status of FHA state machine -uc_8 frameCmpt __attribute__ ((section(".globals"))); // Counter of RF frame -uc_8 frequencyStatistic[20] __attribute__ ((section(".globals"))); // Table with statistic for FHA -ui_16 statisticPointer __attribute__ ((section(".globals"))); // Pointer for the table with statistic for FHA -uc_8 tempoIndexFreq __attribute__ ((section(".globals"))); // Temporary index -uc_8 replaceFrequency __attribute__ ((section(".globals"))); // Temporary index -uc_8 random_numb __attribute__ ((section(".globals"))); // Random number for FHA +uint8_t frequencyTable[20] __attribute__ ((section(".globals"))); // Table with the scheme of frequency +uint8_t frequencyIndex __attribute__ ((section(".globals"))); // Pointer for the table of frequency +uint8_t FHAState __attribute__ ((section(".globals"))); // Status of FHA state machine +uint8_t frameCmpt __attribute__ ((section(".globals"))); // Counter of RF frame +uint8_t frequencyStatistic[20] __attribute__ ((section(".globals"))); // Table with statistic for FHA +uint16_t statisticPointer __attribute__ ((section(".globals"))); // Pointer for the table with statistic for FHA +uint8_t tempoIndexFreq __attribute__ ((section(".globals"))); // Temporary index +uint8_t replaceFrequency __attribute__ ((section(".globals"))); // Temporary index +uint8_t random_numb __attribute__ ((section(".globals"))); // Random number for FHA // SPI -uc_8 spi_enable __attribute__ ((section(".globals"))); // Flag to start spi transaction +uint8_t spi_enable __attribute__ ((section(".globals"))); // Flag to start spi transaction typedef enum { PUT_SOUND_SPI, PUT_COMMAND_SPI, PUT_STATUS_SPI, END_SPI } STM_SPI_SLAVE_MASTER_TYPE; STM_SPI_SLAVE_MASTER_TYPE spi_slave __attribute__ ((section(".globals"))); // SPI state machine variable -uc_8 spi_lenght __attribute__ ((section(".globals"))); // SPI legnht -uc_8 commandBuffer[4] __attribute__ ((section(".globals"))); // SPI command buffer -uc_8 spiConfigFrame[7] __attribute__ ((section(".globals"))); // SPI ID +uint8_t spi_lenght __attribute__ ((section(".globals"))); // SPI legnht +uint8_t commandBuffer[4] __attribute__ ((section(".globals"))); // SPI command buffer +uint8_t spiConfigFrame[7] __attribute__ ((section(".globals"))); // SPI ID // Redundancy variable -uc_8 errorFrame __attribute__ ((section(".globals"))); // Detect error in transmission +uint8_t errorFrame __attribute__ ((section(".globals"))); // Detect error in transmission // Command variables -uc_8 commandStatus __attribute__ ((section(".globals"))); // Status of the command -uc_8 commandCmpt __attribute__ ((section(".globals"))); // Counter for resend command -uc_8 ACKmode __attribute__ ((section(".globals"))); // Wait an ACK +uint8_t commandStatus __attribute__ ((section(".globals"))); // Status of the command +uint8_t commandCmpt __attribute__ ((section(".globals"))); // Counter for resend command +uint8_t ACKmode __attribute__ ((section(".globals"))); // Wait an ACK // Watchdog variable -uc_8 watchdog __attribute__ ((section(".globals"))); // Watchdog for auto reset +uint8_t watchdog __attribute__ ((section(".globals"))); // Watchdog for auto reset // RF toy ID -uc_8 toy_id_l __attribute__ ((section(".globals"))); // Toy ID -uc_8 toy_id_h __attribute__ ((section(".globals"))); +uint8_t toy_id_l __attribute__ ((section(".globals"))); // Toy ID +uint8_t toy_id_h __attribute__ ((section(".globals"))); -volatile uc_8 Test __attribute__ ((section(".globals"))); +volatile uint8_t Test __attribute__ ((section(".globals"))); // Eeprom variable unsigned char ee_filter __attribute__ ((section(".eeprom"))) = 7; Modified: firmware/fuxrf/trunk/varis.h =================================================================== --- firmware/fuxrf/trunk/varis.h 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/fuxrf/trunk/varis.h 2007-10-01 12:02:54 UTC (rev 561) @@ -4,72 +4,72 @@ #include "defines.h" // RF buffer -extern uc_8 rf_buffer_tx1[64] __attribute__ ((section(".buffer_tx1"))); // Buffer for storing the RF TX data -extern uc_8 rf_buffer_rx1[51] __attribute__ ((section(".buffer_rx1"))); // Buffer for storing the RF RX data -extern uc_8 rf_buffer_tx2[64] __attribute__ ((section(".buffer_tx2"))); // Buffer for storing the RF TX data -extern uc_8 rf_buffer_rx2[51] __attribute__ ((section(".buffer_rx2"))); // Buffer for storing the RF RX data +extern uint8_t rf_buffer_tx1[64] __attribute__ ((section(".buffer_tx1"))); // Buffer for storing the RF TX data +extern uint8_t rf_buffer_rx1[51] __attribute__ ((section(".buffer_rx1"))); // Buffer for storing the RF RX data +extern uint8_t rf_buffer_tx2[64] __attribute__ ((section(".buffer_tx2"))); // Buffer for storing the RF TX data +extern uint8_t rf_buffer_rx2[51] __attribute__ ((section(".buffer_rx2"))); // Buffer for storing the RF RX data -extern uc_8 *prf_buffer_rx __attribute__ ((section(".globals"))); -extern uc_8 *pspi_buffer_rx __attribute__ ((section(".globals"))); -extern uc_8 *prf_buffer_tx __attribute__ ((section(".globals"))); -extern uc_8 *pspi_buffer_tx __attribute__ ((section(".globals"))); +extern uint8_t *prf_buffer_rx __attribute__ ((section(".globals"))); +extern uint8_t *pspi_buffer_rx __attribute__ ((section(".globals"))); +extern uint8_t *prf_buffer_tx __attribute__ ((section(".globals"))); +extern uint8_t *pspi_buffer_tx __attribute__ ((section(".globals"))); -extern uc_8 rf_header[4] __attribute__ ((section(".globals"))); // Rf header +extern uint8_t rf_header[4] __attribute__ ((section(".globals"))); // Rf header // SOF buffer -extern uc_8 sof_ary[3] __attribute__ ((section(".sof"))); // Variable holding the 4 bytes start of frame +extern uint8_t sof_ary[3] __attribute__ ((section(".sof"))); // Variable holding the 4 bytes start of frame // RF variables -extern uc_8 rf_status __attribute__ ((section(".globals"))); // Satus of the RF - Task (Locked or Unlocked) -extern volatile uc_8 channel __attribute__ ((section(".globals"))); // Currently used RF - Channel -extern uc_8 rfStateCount __attribute__ ((section(".globals"))); // Counter for RF-IRQ-State machine -extern uc_8 tx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet TX -extern uc_8 rx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet RX -extern uc_8 rf_tx_counter __attribute__ ((section(".globals"))); // Counting the TX'ed bytes -extern uc_8 rf_rx_counter __attribute__ ((section(".globals"))); // Counting the RX'ed bytes -extern uc_8 rf_rx_state __attribute__ ((section(".globals"))); // State of the RX interrupt -extern uc_8 checksum __attribute__ ((section(".globals"))); // Checksum => 0x00 => okay -extern ui_16 ts __attribute__ ((section(".globals"))); // Timestamp for resynchronisation, if in synchronous mode -extern uc_8 rx_buffer_ready __attribute__ ((section(".globals"))); // Correct frame recieve flag -extern uc_8 gfilter __attribute__ ((section(".globals"))); // Gaussian filter value +extern uint8_t rf_status __attribute__ ((section(".globals"))); // Satus of the RF - Task (Locked or Unlocked) +extern volatile uint8_t channel __attribute__ ((section(".globals"))); // Currently used RF - Channel +extern uint8_t rfStateCount __attribute__ ((section(".globals"))); // Counter for RF-IRQ-State machine +extern uint8_t tx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet TX +extern uint8_t rx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet RX +extern uint8_t rf_tx_counter __attribute__ ((section(".globals"))); // Counting the TX'ed bytes +extern uint8_t rf_rx_counter __attribute__ ((section(".globals"))); // Counting the RX'ed bytes +extern uint8_t rf_rx_state __attribute__ ((section(".globals"))); // State of the RX interrupt +extern uint8_t checksum __attribute__ ((section(".globals"))); // Checksum => 0x00 => okay +extern uint16_t ts __attribute__ ((section(".globals"))); // Timestamp for resynchronisation, if in synchronous mode +extern uint8_t rx_buffer_ready __attribute__ ((section(".globals"))); // Correct frame recieve flag +extern uint8_t gfilter __attribute__ ((section(".globals"))); // Gaussian filter value // Adaptive FHSS -extern uc_8 frequencyTable[20] __attribute__ ((section(".globals"))); // Table with the scheme of frequency -extern uc_8 frequencyIndex __attribute__ ((section(".globals"))); // Pointer for the table of frequency -extern uc_8 FHAState __attribute__ ((section(".globals"))); // Status of FHA state machine -extern uc_8 frameCmpt __attribute__ ((section(".globals"))); // Counter of RF frame -extern uc_8 frequencyStatistic[20] __attribute__ ((section(".globals"))); // Table with statistic for FHA -extern ui_16 statisticPointer __attribute__ ((section(".globals"))); // Pointer for the table with statistic for FHA -extern uc_8 tempoIndexFreq __attribute__ ((section(".globals"))); // Temporary index -extern uc_8 replaceFrequency __attribute__ ((section(".globals"))); // Temporary frequency -extern uc_8 random_numb __attribute__ ((section(".globals"))); // Random number for FHA +extern uint8_t frequencyTable[20] __attribute__ ((section(".globals"))); // Table with the scheme of frequency +extern uint8_t frequencyIndex __attribute__ ((section(".globals"))); // Pointer for the table of frequency +extern uint8_t FHAState __attribute__ ((section(".globals"))); // Status of FHA state machine +extern uint8_t frameCmpt __attribute__ ((section(".globals"))); // Counter of RF frame +extern uint8_t frequencyStatistic[20] __attribute__ ((section(".globals"))); // Table with statistic for FHA +extern uint16_t statisticPointer __attribute__ ((section(".globals"))); // Pointer for the table with statistic for FHA +extern uint8_t tempoIndexFreq __attribute__ ((section(".globals"))); // Temporary index +extern uint8_t replaceFrequency __attribute__ ((section(".globals"))); // Temporary frequency +extern uint8_t random_numb __attribute__ ((section(".globals"))); // Random number for FHA // SPI -extern uc_8 spi_enable __attribute__ ((section(".globals"))); // Flag to start spi transaction +extern uint8_t spi_enable __attribute__ ((section(".globals"))); // Flag to start spi transaction typedef enum { PUT_SOUND_SPI, PUT_COMMAND_SPI, PUT_STATUS_SPI, END_SPI } STM_SPI_SLAVE_MASTER_TYPE; extern STM_SPI_SLAVE_MASTER_TYPE spi_slave __attribute__ ((section(".globals"))); // SPI state machine variable -extern uc_8 spi_lenght __attribute__ ((section(".globals"))); // SPI legnht -extern uc_8 commandBuffer[4] __attribute__ ((section(".globals"))); // SPI legnht -extern uc_8 spiConfigFrame[7] __attribute__ ((section(".globals"))); // SPI ID +extern uint8_t spi_lenght __attribute__ ((section(".globals"))); // SPI legnht +extern uint8_t commandBuffer[4] __attribute__ ((section(".globals"))); // SPI legnht +extern uint8_t spiConfigFrame[7] __attribute__ ((section(".globals"))); // SPI ID // Redundancy variable -extern uc_8 errorFrame __attribute__ ((section(".globals"))); // Detect error in transmission +extern uint8_t errorFrame __attribute__ ((section(".globals"))); // Detect error in transmission // Command variables -extern uc_8 commandStatus __attribute__ ((section(".globals"))); // Status of the command -extern uc_8 commandCmpt __attribute__ ((section(".globals"))); // Counter for resend command -extern uc_8 ACKmode __attribute__ ((section(".globals"))); // Wait an ACK +extern uint8_t commandStatus __attribute__ ((section(".globals"))); // Status of the command +extern uint8_t commandCmpt __attribute__ ((section(".globals"))); // Counter for resend command +extern uint8_t ACKmode __attribute__ ((section(".globals"))); // Wait an ACK // Watchdog variable -extern uc_8 watchdog __attribute__ ((section(".globals"))); // Watchdog for auto reset +extern uint8_t watchdog __attribute__ ((section(".globals"))); // Watchdog for auto reset // RF toy ID -extern uc_8 toy_id_l __attribute__ ((section(".globals"))); // Toy ID -extern uc_8 toy_id_h __attribute__ ((section(".globals"))); +extern uint8_t toy_id_l __attribute__ ((section(".globals"))); // Toy ID +extern uint8_t toy_id_h __attribute__ ((section(".globals"))); -extern volatile uc_8 Test __attribute__ ((section(".globals"))); +extern volatile uint8_t Test __attribute__ ((section(".globals"))); // Eeprom variable extern unsigned char ee_filter __attribute__ ((section(".eeprom"))); Modified: firmware/tuxrf/trunk/defines.h =================================================================== --- firmware/tuxrf/trunk/defines.h 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/tuxrf/trunk/defines.h 2007-10-01 12:02:54 UTC (rev 561) @@ -13,12 +13,6 @@ #define TRX_CHANNEL 90 #define FHA // Use frequency hopping adaptativ -// Type definition -#define uc_8 unsigned char -#define ui_16 unsigned int -#define sc_8 char -#define si_16 int - //------->rf_status-Defines<-------// #define WAIT_HOPPING 0x02 #define RXING 0x04 Modified: firmware/tuxrf/trunk/init.c =================================================================== --- firmware/tuxrf/trunk/init.c 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/tuxrf/trunk/init.c 2007-10-01 12:02:54 UTC (rev 561) @@ -89,15 +89,15 @@ //***************************************************************************** void init_varis(void) { - uc_8 i; + uint8_t i; i = input(SPL); i ^= 0xFF; - extern ui_16 __bss_start; - extern ui_16 __stack; - uc_8 *ptr = (uc_8 *) & __bss_start; + extern uint16_t __bss_start; + extern uint16_t __stack; + uint8_t *ptr = (uint8_t *) & __bss_start; - while (ptr < (uc_8 *) & __stack - i) + while (ptr < (uint8_t *) & __stack - i) { /*sub because of returning of subroutine */ *ptr++ = 0; } // Put the RAM to 0 Modified: firmware/tuxrf/trunk/misc.c =================================================================== --- firmware/tuxrf/trunk/misc.c 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/tuxrf/trunk/misc.c 2007-10-01 12:02:54 UTC (rev 561) @@ -15,9 +15,9 @@ //* Date: 31.01.06 * //* Description: Generates a delay. T(delay) = val * 10us * //***************************************************************************** -void wait_n_10us(uc_8 val) +void wait_n_10us(uint8_t val) { - uc_8 i, j; + uint8_t i, j; i = val; for (i = 0; i < val; i++) @@ -45,8 +45,8 @@ //***************************************************************************** void calc_checksum(unsigned char *pbuffer) { - uc_8 i, tmp; - uc_8 *ptr; + uint8_t i, tmp; + uint8_t *ptr; ptr = pbuffer + 16; // Get address of start of RF frame if (*(pbuffer + 16) & SMALLFRAME) Modified: firmware/tuxrf/trunk/misc.h =================================================================== --- firmware/tuxrf/trunk/misc.h 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/tuxrf/trunk/misc.h 2007-10-01 12:02:54 UTC (rev 561) @@ -3,7 +3,7 @@ #include "defines.h" -extern void wait_n_10us(uc_8 val); +extern void wait_n_10us(uint8_t val); extern void calc_checksum(unsigned char *pbuffer); #endif Modified: firmware/tuxrf/trunk/prot.c =================================================================== --- firmware/tuxrf/trunk/prot.c 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/tuxrf/trunk/prot.c 2007-10-01 12:02:54 UTC (rev 561) @@ -22,7 +22,7 @@ { unsigned char i, out, sleepCmpt; unsigned char RFinitState; // Init state machine variable - ui_16 j; + uint16_t j; rf_status |= SLAVE; // Set rf status like slave out = 0; // Variable to control init loop Modified: firmware/tuxrf/trunk/rf_ctrl.c =================================================================== --- firmware/tuxrf/trunk/rf_ctrl.c 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/tuxrf/trunk/rf_ctrl.c 2007-10-01 12:02:54 UTC (rev 561) @@ -255,10 +255,10 @@ //* Description: Programms the ATR2406 to the desired channel and to the * //* desired mode. * //***************************************************************************** -void init_atr2406(uc_8 channel, uc_8 mode) +void init_atr2406(uint8_t channel, uint8_t mode) { - uc_8 i, dat_l, dat_h, tmp; - ui_16 conf_data; + uint8_t i, dat_l, dat_h, tmp; + uint16_t conf_data; set_nole; clr_data; @@ -287,9 +287,9 @@ } } dat_l |= 0x80; - conf_data = (uc_8) dat_h; + conf_data = (uint8_t) dat_h; conf_data = conf_data << 8; - conf_data += (uc_8) dat_l; + conf_data += (uint8_t) dat_l; for (i = 0; i < 16; i++) // Shift out configuration word { clr_clock; @@ -366,8 +366,8 @@ //--------------------------C-Source Code-------------------------------------* //*SIGNAL (SIG_USART_DATA) * //*{ * -//* uc_8 *ptr; * -//* uc_8 data; * +//* uint8_t *ptr; * +//* uint8_t data; * //* ptr = prf_buffer_tx; * //* ptr += rf_tx_counter; * //* rf_tx_counter++; * @@ -524,8 +524,8 @@ //*---------------------C-Source Code-----------------------------------------* //*SIGNAL_NAKED (SIG_USART_RECV) * //*{ * -//* uc_8 data,tmp; * -//* uc_8 *ptr; * +//* uint8_t data,tmp; * +//* uint8_t *ptr; * //* if (rf_rx_state == 0x03) // Receive data * //* { * //* ptr = prf_buffer_rx + rf_rx_counter * Modified: firmware/tuxrf/trunk/rf_ctrl.h =================================================================== --- firmware/tuxrf/trunk/rf_ctrl.h 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/tuxrf/trunk/rf_ctrl.h 2007-10-01 12:02:54 UTC (rev 561) @@ -46,7 +46,7 @@ #include "defines.h" -extern void init_atr2406(uc_8 channel, uc_8 mode); +extern void init_atr2406(uint8_t channel, uint8_t mode); extern void pwr_up_atr2406(void); extern void pwr_dwn_atr2406(void); extern void start_rf_timer(void); Modified: firmware/tuxrf/trunk/varis.c =================================================================== --- firmware/tuxrf/trunk/varis.c 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/tuxrf/trunk/varis.c 2007-10-01 12:02:54 UTC (rev 561) @@ -1,71 +1,71 @@ #include "defines.h" // RF buffer -uc_8 rf_buffer_tx1[64] __attribute__ ((section(".buffer_tx1"))); // Buffer for storing the RF TX data -uc_8 rf_buffer_rx1[51] __attribute__ ((section(".buffer_rx1"))); // Buffer for storing the RF RX data -uc_8 rf_buffer_tx2[64] __attribute__ ((section(".buffer_tx2"))); // Buffer for storing the RF TX data -uc_8 rf_buffer_rx2[51] __attribute__ ((section(".buffer_rx2"))); // Buffer for storing the RF RX data +uint8_t rf_buffer_tx1[64] __attribute__ ((section(".buffer_tx1"))); // Buffer for storing the RF TX data +uint8_t rf_buffer_rx1[51] __attribute__ ((section(".buffer_rx1"))); // Buffer for storing the RF RX data +uint8_t rf_buffer_tx2[64] __attribute__ ((section(".buffer_tx2"))); // Buffer for storing the RF TX data +uint8_t rf_buffer_rx2[51] __attribute__ ((section(".buffer_rx2"))); // Buffer for storing the RF RX data -uc_8 *prf_buffer_rx __attribute__ ((section(".globals"))); -uc_8 *pspi_buffer_rx __attribute__ ((section(".globals"))); -uc_8 *prf_buffer_tx __attribute__ ((section(".globals"))); -uc_8 *pspi_buffer_tx __attribute__ ((section(".globals"))); +uint8_t *prf_buffer_rx __attribute__ ((section(".globals"))); +uint8_t *pspi_buffer_rx __attribute__ ((section(".globals"))); +uint8_t *prf_buffer_tx __attribute__ ((section(".globals"))); +uint8_t *pspi_buffer_tx __attribute__ ((section(".globals"))); // SOF buffer -uc_8 sof_ary[3] __attribute__ ((section(".sof"))); // Variable holding the 4 bytes start of frame +uint8_t sof_ary[3] __attribute__ ((section(".sof"))); // Variable holding the 4 bytes start of frame // RF variables -uc_8 rf_status __attribute__ ((section(".globals"))); // Satus of the RF - Task (Locked or Unlocked) -volatile uc_8 channel __attribute__ ((section(".globals"))); // Currently used RF - Channel -uc_8 rfStateCount __attribute__ ((section(".globals"))); // Counter for RF-IRQ-State machine -uc_8 tx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet TX -uc_8 rx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet RX -uc_8 rf_tx_counter __attribute__ ((section(".globals"))); // Counting the TX'ed bytes -uc_8 rf_rx_counter __attribute__ ((section(".globals"))); // Counting the RX'ed bytes -uc_8 rf_rx_state __attribute__ ((section(".globals"))); // State of the RX interrupt -uc_8 checksum __attribute__ ((section(".globals"))); // Checksum => 0x00 => okay -ui_16 ts __attribute__ ((section(".globals"))); // Timestamp for resynchronisation, if in synchronous mode -uc_8 rx_buffer_ready __attribute__ ((section(".globals"))); // Correct frame recieve flag -uc_8 gfilter __attribute__ ((section(".globals"))); // Gaussian filter value +uint8_t rf_status __attribute__ ((section(".globals"))); // Satus of the RF - Task (Locked or Unlocked) +volatile uint8_t channel __attribute__ ((section(".globals"))); // Currently used RF - Channel +uint8_t rfStateCount __attribute__ ((section(".globals"))); // Counter for RF-IRQ-State machine +uint8_t tx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet TX +uint8_t rx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet RX +uint8_t rf_tx_counter __attribute__ ((section(".globals"))); // Counting the TX'ed bytes +uint8_t rf_rx_counter __attribute__ ((section(".globals"))); // Counting the RX'ed bytes +uint8_t rf_rx_state __attribute__ ((section(".globals"))); // State of the RX interrupt +uint8_t checksum __attribute__ ((section(".globals"))); // Checksum => 0x00 => okay +uint16_t ts __attribute__ ((section(".globals"))); // Timestamp for resynchronisation, if in synchronous mode +uint8_t rx_buffer_ready __attribute__ ((section(".globals"))); // Correct frame recieve flag +uint8_t gfilter __attribute__ ((section(".globals"))); // Gaussian filter value // Adaptive FHSS -uc_8 frequencyTable[20] __attribute__ ((section(".globals"))); // Table with the scheme of frequency -uc_8 frequencyIndex __attribute__ ((section(".globals"))); // Pointer for the table of frequency -uc_8 FHAState __attribute__ ((section(".globals"))); // Status of FHA state machine -uc_8 frameCmpt __attribute__ ((section(".globals"))); // Counter of RF frame -uc_8 tempoIndexFreq __attribute__ ((section(".globals"))); // Temporary index -uc_8 replaceFrequency __attribute__ ((section(".globals"))); // Temporary index +uint8_t frequencyTable[20] __attribute__ ((section(".globals"))); // Table with the scheme of frequency +uint8_t frequencyIndex __attribute__ ((section(".globals"))); // Pointer for the table of frequency +uint8_t FHAState __attribute__ ((section(".globals"))); // Status of FHA state machine +uint8_t frameCmpt __attribute__ ((section(".globals"))); // Counter of RF frame +uint8_t tempoIndexFreq __attribute__ ((section(".globals"))); // Temporary index +uint8_t replaceFrequency __attribute__ ((section(".globals"))); // Temporary index // SPI -uc_8 spi_enable __attribute__ ((section(".globals"))); // Flag to start spi transaction +uint8_t spi_enable __attribute__ ((section(".globals"))); // Flag to start spi transaction typedef enum { PUT_SOUND_SPI, PUT_COMMAND_SPI, PUT_STATUS_SPI, END_SPI } STM_SPI_SLAVE_MASTER_TYPE; STM_SPI_SLAVE_MASTER_TYPE spi_slave __attribute__ ((section(".globals"))); // SPI state machine variable -uc_8 spi_lenght __attribute__ ((section(".globals"))); // SPI legnht -uc_8 commandBuffer[4] __attribute__ ((section(".globals"))); // SPI legnht +uint8_t spi_lenght __attribute__ ((section(".globals"))); // SPI legnht +uint8_t commandBuffer[4] __attribute__ ((section(".globals"))); // SPI legnht // Redundancy variable -uc_8 errorFrame __attribute__ ((section(".globals"))); // Detect error in transmission +uint8_t errorFrame __attribute__ ((section(".globals"))); // Detect error in transmission // Command variables -uc_8 commandStatus __attribute__ ((section(".globals"))); // Status of the command -uc_8 commandCmpt __attribute__ ((section(".globals"))); // Counter for resend command -uc_8 ACKmode __attribute__ ((section(".globals"))); // Wait an ACK +uint8_t commandStatus __attribute__ ((section(".globals"))); // Status of the command +uint8_t commandCmpt __attribute__ ((section(".globals"))); // Counter for resend command +uint8_t ACKmode __attribute__ ((section(".globals"))); // Wait an ACK // Watchdog variable -uc_8 watchdog __attribute__ ((section(".globals"))); // Watchdog for auto reset +uint8_t watchdog __attribute__ ((section(".globals"))); // Watchdog for auto reset // RF toy ID -uc_8 toy_id_l __attribute__ ((section(".globals"))); // Toy ID -uc_8 toy_id_h __attribute__ ((section(".globals"))); -uc_8 requestID __attribute__ ((section(".globals"))); -uc_8 changeID __attribute__ ((section(".globals"))); -volatile uc_8 Test __attribute__ ((section(".globals"))); // Test +uint8_t toy_id_l __attribute__ ((section(".globals"))); // Toy ID +uint8_t toy_id_h __attribute__ ((section(".globals"))); +uint8_t requestID __attribute__ ((section(".globals"))); +uint8_t changeID __attribute__ ((section(".globals"))); +volatile uint8_t Test __attribute__ ((section(".globals"))); // Test // Sleep mode -volatile uc_8 sleepMode __attribute__ ((section(".globals"))); // Sleep mode flag +volatile uint8_t sleepMode __attribute__ ((section(".globals"))); // Sleep mode flag // Eeprom variable unsigned char ee_filter __attribute__ ((section(".eeprom"))) = 5; Modified: firmware/tuxrf/trunk/varis.h =================================================================== --- firmware/tuxrf/trunk/varis.h 2007-10-01 10:43:21 UTC (rev 560) +++ firmware/tuxrf/trunk/varis.h 2007-10-01 12:02:54 UTC (rev 561) @@ -4,72 +4,72 @@ #include "defines.h" // RF buffer -extern uc_8 rf_buffer_tx1[64] __attribute__ ((section(".buffer_tx1"))); // Buffer for storing the RF TX data -extern uc_8 rf_buffer_rx1[51] __attribute__ ((section(".buffer_rx1"))); // Buffer for storing the RF RX data -extern uc_8 rf_buffer_tx2[64] __attribute__ ((section(".buffer_tx2"))); // Buffer for storing the RF TX data -extern uc_8 rf_buffer_rx2[51] __attribute__ ((section(".buffer_rx2"))); // Buffer for storing the RF RX data +extern uint8_t rf_buffer_tx1[64] __attribute__ ((section(".buffer_tx1"))); // Buffer for storing the RF TX data +extern uint8_t rf_buffer_rx1[51] __attribute__ ((section(".buffer_rx1"))); // Buffer for storing the RF RX data +extern uint8_t rf_buffer_tx2[64] __attribute__ ((section(".buffer_tx2"))); // Buffer for storing the RF TX data +extern uint8_t rf_buffer_rx2[51] __attribute__ ((section(".buffer_rx2"))); // Buffer for storing the RF RX data -extern uc_8 *prf_buffer_rx __attribute__ ((section(".globals"))); -extern uc_8 *pspi_buffer_rx __attribute__ ((section(".globals"))); -extern uc_8 *prf_buffer_tx __attribute__ ((section(".globals"))); -extern uc_8 *pspi_buffer_tx __attribute__ ((section(".globals"))); +extern uint8_t *prf_buffer_rx __attribute__ ((section(".globals"))); +extern uint8_t *pspi_buffer_rx __attribute__ ((section(".globals"))); +extern uint8_t *prf_buffer_tx __attribute__ ((section(".globals"))); +extern uint8_t *pspi_buffer_tx __attribute__ ((section(".globals"))); // SOF buffer -extern uc_8 sof_ary[3] __attribute__ ((section(".sof"))); // Variable holding the 4 bytes start of frame +extern uint8_t sof_ary[3] __attribute__ ((section(".sof"))); // Variable holding the 4 bytes start of frame // RF variables -extern uc_8 rf_status __attribute__ ((section(".globals"))); // Satus of the RF - Task (Locked or Unlocked) -extern volatile uc_8 channel __attribute__ ((section(".globals"))); // Currently used RF - Channel -extern uc_8 rfStateCount __attribute__ ((section(".globals"))); // Counter for RF-IRQ-State machine -extern uc_8 tx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet TX -extern uc_8 rx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet RX -extern uc_8 rf_tx_counter __attribute__ ((section(".globals"))); // Counting the TX'ed bytes -extern uc_8 rf_rx_counter __attribute__ ((section(".globals"))); // Counting the RX'ed bytes -extern uc_8 rf_rx_state __attribute__ ((section(".globals"))); // State of the RX interrupt -extern uc_8 checksum __attribute__ ((section(".globals"))); // Checksum => 0x00 => okay -extern ui_16 ts __attribute__ ((section(".globals"))); // Timestamp for resynchronisation, if in synchronous mode -extern uc_8 rx_buffer_ready __attribute__ ((section(".globals"))); // Correct frame recieve flag -extern uc_8 gfilter __attribute__ ((section(".globals"))); // Gaussian filter value +extern uint8_t rf_status __attribute__ ((section(".globals"))); // Satus of the RF - Task (Locked or Unlocked) +extern volatile uint8_t channel __attribute__ ((section(".globals"))); // Currently used RF - Channel +extern uint8_t rfStateCount __attribute__ ((section(".globals"))); // Counter for RF-IRQ-State machine +extern uint8_t tx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet TX +extern uint8_t rx_pac_len __attribute__ ((section(".globals"))); // Variable containing the length of the current RF - Packet RX +extern uint8_t rf_tx_counter __attribute__ ((section(".globals"))); // Counting the TX'ed bytes +extern uint8_t rf_rx_counter __attribute__ ((section(".globals"))); // Counting the RX'ed bytes +extern uint8_t rf_rx_state __attribute__ ((section(".globals"))); // State of the RX interrupt +extern uint8_t checksum __attribute__ ((section(".globals"))); // Checksum => 0x00 => okay +extern uint16_t ts __attribute__ ((section(".globals"))); // Timestamp for resynchronisation, if in synchronous mode +extern uint8_t rx_buffer_ready __attribute__ ((section(".globals"))); // Correct frame recieve flag +extern uint8_t gfilter __attribute__ ((section(".globals"))); // Gaussian filter value // Adaptive FHSS -extern uc_8 frequencyTable[20] __attribute__ ((section(".globals"))); // Table with the scheme of frequency -extern uc_8 frequencyIndex __attribute__ ((section(".globals"))); // Pointer for the table of frequency -extern uc_8 FHAState __attribute__ ((section(".globals"))); // Status of FHA state machine -extern uc_8 frameCmpt __attribute__ ((section(".globals"))); // Counter of RF frame -extern uc_8 tempoIndexFreq __attribute__ ((section(".globals"))); // Temporary index -extern uc_8 replaceFrequency __attribute__ ((section(".globals"))); // Temporary frequency +extern uint8_t frequencyTable[20] __attribute__ ((section(".globals"))); // Table with the scheme of frequency +extern uint8_t frequencyIndex __attribute__ ((section(".globals"))); // Pointer for the table of frequency +extern uint8_t FHAState __attribute__ ((section(".globals"))); // Status of FHA state machine +extern uint8_t frameCmpt __attribute__ ((section(".globals"))); // Counter of RF frame +extern uint8_t tempoIndexFreq __attribute__ ((section(".globals"))); // Temporary index +extern uint8_t replaceFrequency __attribute__ ((section(".globals"))); // Temporary frequency // SPI -extern uc_8 spi_enable __attribute__ ((section(".globals"))); // Flag to start spi transaction +extern uint8_t spi_enable __attribute__ ((section(".globals"))); // Flag to start spi transaction typedef enum { PUT_SOUND_SPI, PUT_COMMAND_SPI, PUT_STATUS_SPI, END_SPI } STM_SPI_SLAVE_MASTER_TYPE; extern STM_SPI_SLAVE_MASTER_TYPE spi_slave __attribute__ ((section(".globals"))); // SPI state machine variable -extern uc_8 spi_lenght __attribute__ ((section(".globals"))); // SPI legnht -extern uc_8 commandBuffer[4] __attribute__ ((section(".globals"))); // SPI legnht +extern uint8_t spi_lenght __attribute__ ((section(".globals"))); // SPI legnht +extern uint8_t commandBuffer[4] __attribute__ ((section(".globals"))); // SPI legnht // Redundancy variable -extern uc_8 errorFrame __attribute__ ((section(".globals"))); // Detect error in transmission +extern uint8_t errorFrame __attribute__ ((section(".globals"))); // Detect error in transmission // Command variables -extern uc_8 commandStatus __attribute__ ((section(".globals"))); // Status of the command -extern uc_8 commandCmpt __attribute__ ((section(".globals"))); // Counter for resend command -extern uc_8 ACKmode __attribute__ ((section(".globals"))); // Wait an ACK +extern uint8_t commandStatus __attribute__ ((section(".globals"))); // Status of the command +extern uint8_t commandCmpt __attribute__ ((section(".globals"))); // Counter for resend command +extern uint8_t ACKmode __attribute__ ((section(".globals"))); // Wait an ACK // Watchdog variable -extern uc_8 watchdog __attribute__ ((section(".globals"))); // Watchdog for auto reset +extern uint8_t watchdog __attribute__ ((section(".globals"))); // Watchdog for auto reset // RF toy ID -extern uc_8 toy_id_l __attribute__ ((section(".globals"))); // Toy ID -extern uc_8 toy_id_h __attribute__ ((section(".globals"))); -extern uc_8 requestID __attribute__ ((section(".globals"))); -extern uc_8 changeID __attribute__ ((section(".globals"))); +extern uint8_t toy_id_l __attribute__ ((section(".globals"))); // Toy ID +extern uint8_t toy_id_h __attribute__ ((section(".globals"))); +extern uint8_t requestID __attribute__ ((section(".globals"))); +extern uint8_t changeID __attribute__ ((section(".globals"))); -extern volatile uc_8 Test __attribute__ ((section(".globals"))); // Test +extern volatile uint8_t Test __attribute__ ((section(".globals"))); // Test // Sleep mode -extern volatile uc_8 sleepMode __attribute__ ((section(".globals"))); // Sleep mode flag +extern volatile uint8_t sleepMode __attribute__ ((section(".globals"))); // Sleep mode flag // Eeprom variable extern unsigned char ee_filter __attribute__ ((section(".eeprom"))); |