stk_525.h File Reference

,vThis file contains the low level macros and definition for stk525 board More...

#include "config.h"

Include dependency graph for stk_525.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define Leds_init()   (DDRD |= 0xF0)
#define Leds_on()   (PORTD |= 0xF0)
#define Leds_off()   (PORTD &= 0x0F)
#define Led0_on()   (PORTD |= 0x10)
#define Led1_on()   (PORTD |= 0x20)
#define Led2_on()   (PORTD |= 0x40)
#define Led3_on()   (PORTD |= 0x80)
#define Led0_off()   (PORTD &= 0xEF)
#define Led1_off()   (PORTD &= 0xDF)
#define Led2_off()   (PORTD &= 0xBF)
#define Led3_off()   (PORTD &= 0x7F)
#define Led0_toggle()   (PIND |= 0x10)
#define Led1_toggle()   (PIND |= 0x20)
#define Led2_toggle()   (PIND |= 0x40)
#define Led3_toggle()   (PIND |= 0x80)
#define Leds_set_val(c)   (Leds_off(),PORTD |= (c<<4)&0xF0)
#define Leds_get_val()   (PORTD>>4)
#define Joy_init()   (DDRB &= 0x1F, PORTB |= 0xE0, DDRE &= 0xE7, PORTE |= 0x30)
#define Is_joy_up()   ((PINB & 0x80) ? FALSE : TRUE)
#define Is_joy_not_up()   ((PINB & 0x80) ? TRUE : FALSE)
#define Is_joy_left()   ((PINB & 0x40) ? FALSE : TRUE)
#define Is_joy_not_left()   ((PINB & 0x40) ? TRUE : FALSE)
#define Is_joy_select()   ((PINB & 0x20) ? FALSE : TRUE)
#define Is_joy_not_select()   ((PINB & 0x20) ? TRUE : FALSE)
#define Is_joy_right()   ((PINE & 0x10) ? FALSE : TRUE)
#define Is_joy_not_right()   ((PINE & 0x10) ? TRUE : FALSE)
#define Is_joy_down()   ((PINE & 0x20) ? FALSE : TRUE)
#define Is_joy_not_down()   ((PINE & 0x20) ? TRUE : FALSE)
#define Hwb_button_init()   (DDRE &= 0xFB, PORTE |= 0x04)
#define Is_hwb()   ((PINE & 0x04) ? FALSE : TRUE)
#define Is_not_hwb()   ((PINE & 0x04) ? TRUE : FALSE)
#define ADC_POT_CH   0x01
 STK 525 ADC Potentiometer Channel Definition.
#define ADC_MIC_CH   0x02
#define ADC_TEMP_CH   0x00
 this define is set in config.h file
#define DF_4_MB
#define DF_SELECT_MEM   0
#define DF_UNSELECT_MEM   1
#define DF_NB_MEM   1
#define Init_df_stk525()   (DDRB_Bit4=1,PORTB_Bit3=1,PORTB_Bit4=1,PORTB_Bit0=1)
#define DF_CS_PIN   PORTB_Bit4
#define DF_CS0   DF_CS_PIN
#define DF_CS1   DF_CS0
#define DF_CS2   DF_CS0
#define DF_CS3   DF_CS0
#define Df_select_df(i, val)   (DF_CS##i = val)
#define Df_desel_all()   (DF_CS0=DF_UNSELECT_MEM)
#define df_init_spi()   Init_df_stk525()

Functions

U16 Get_adc_mic_val (void)
 Get_adc_mic_val.
U16 Get_adc_temp_val (void)
 Get_adc_temp_val.
U16 Get_adc_pot_val (void)
 Get_adc_pot_val.
S16 Read_temperature (void)
 Read_temperature.


Detailed Description

,vThis file contains the low level macros and definition for stk525 board

Copyright (c) 2004 Atmel.

Please read file license.txt for copyright notice.

Version:
1.13 at90usb128-demo-hidgen-1_0_0
Todo:
Bug:

Definition in file stk_525.h.


Generated on Fri Mar 17 16:02:07 2006 for Atmel by  doxygen 1.4.6-NO