
#ifndef _LINPAC_AM335X_H
#define _LINPAC_AM335X_H

//#define HA401 1
#define LP5231 1

#ifdef HA401
#define UBUNTU 1
#else
#define ANGSTROM 1
#endif

#define NOERROR      0
#define NOOPEN       1
#define NOFILE       2
#define NODEVICE     3
#define NORIGHTARG   4

#define DIRECTION_OUT 1
#define DIRECTION_IN  0

int gpio_direction_status(int gpio, unsigned char *direction);
int gpio_direction_set(int gpio, unsigned char direction);
int gpio_value_out(int gpio, unsigned char value);
int gpio_value_in(int gpio, unsigned char *value);


#ifdef HA401
#else
int read_sn(char *sn);
int lp5231_buzzer(int turn);
int lp5231_set_led(int led, int green, int red);
int rotary_switch_read(unsigned char *value);
int angstrom_ip_static(char *ip, char *mask, char *gateway);
int angstrom_ip_dhcp(void);
#endif




#endif
