1 /* IO interface mux allocator for ETRAX100LX.
2 * Copyright 2004, Axis Communications AB
3 * $Id: io_interface_mux.h,v 1.1 2004/12/13 12:21:53 starvik Exp $
7 #ifndef _IO_INTERFACE_MUX_H
8 #define _IO_INTERFACE_MUX_H
11 /* C.f. ETRAX100LX Designer's Reference 20.9 */
13 /* The order in enum must match the order of interfaces[] in
14 * io_interface_mux.c */
15 enum cris_io_interface {
16 /* Begin Non-multiplexed interfaces */
19 /* End Non-multiplexed interfaces */
49 int cris_request_io_interface(enum cris_io_interface ioif, const char *device_id);
51 void cris_free_io_interface(enum cris_io_interface ioif);
53 /* port can be 'a', 'b' or 'g' */
54 int cris_io_interface_allocate_pins(const enum cris_io_interface ioif,
56 const unsigned start_bit,
57 const unsigned stop_bit);
59 /* port can be 'a', 'b' or 'g' */
60 int cris_io_interface_free_pins(const enum cris_io_interface ioif,
62 const unsigned start_bit,
63 const unsigned stop_bit);
65 int cris_io_interface_register_watcher(void (*notify)(const unsigned int gpio_in_available,
66 const unsigned int gpio_out_available,
67 const unsigned char pa_available,
68 const unsigned char pb_available));
70 void cris_io_interface_delete_watcher(void (*notify)(const unsigned int gpio_in_available,
71 const unsigned int gpio_out_available,
72 const unsigned char pa_available,
73 const unsigned char pb_available));
75 #endif /* _IO_INTERFACE_MUX_H */