Revision e2733d20 vl.h

b/vl.h
528 528
/* openpic.c */
529 529
typedef struct openpic_t openpic_t;
530 530
void openpic_set_irq (openpic_t *opp, int n_IRQ, int level);
531
openpic_t *openpic_init (PCIBus *bus,
532
                         uint32_t isu_base, uint32_t idu_base, int nb_cpus);
531
openpic_t *openpic_init (PCIBus *bus, int *pmem_index, int nb_cpus);
533 532

  
534 533
/* vga.c */
535 534

  
......
727 726

  
728 727
#define MAX_ADB_DEVICES 16
729 728

  
730
typedef struct ADBDevice ADBDevice;
729
#define ADB_MAX_OUT_LEN 16
731 730

  
732
typedef void ADBDeviceReceivePacket(ADBDevice *d, const uint8_t *buf, int len);
731
typedef struct ADBDevice ADBDevice;
733 732

  
733
/* buf = NULL means polling */
734
typedef int ADBDeviceRequest(ADBDevice *d, uint8_t *buf_out,
735
                              const uint8_t *buf, int len);
734 736
struct ADBDevice {
735 737
    struct ADBBusState *bus;
736 738
    int devaddr;
737 739
    int handler;
738
    ADBDeviceReceivePacket *receive_packet;
740
    ADBDeviceRequest *devreq;
739 741
    void *opaque;
740 742
};
741 743

  
742 744
typedef struct ADBBusState {
743 745
    ADBDevice devices[MAX_ADB_DEVICES];
744 746
    int nb_devices;
747
    int poll_index;
745 748
} ADBBusState;
746 749

  
747
void adb_receive_packet(ADBBusState *s, const uint8_t *buf, int len);
748
void adb_send_packet(ADBBusState *s, const uint8_t *buf, int len);
750
int adb_request(ADBBusState *s, uint8_t *buf_out,
751
                const uint8_t *buf, int len);
752
int adb_poll(ADBBusState *s, uint8_t *buf_out);
749 753

  
750 754
ADBDevice *adb_register_device(ADBBusState *s, int devaddr, 
751
                               ADBDeviceReceivePacket *receive_packet, 
755
                               ADBDeviceRequest *devreq, 
752 756
                               void *opaque);
753 757
void adb_kbd_init(ADBBusState *bus);
754 758
void adb_mouse_init(ADBBusState *bus);

Also available in: Unified diff