Subversion Repositories svn.mios32

Rev

Rev 2646 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2646 Rev 2657
Line 85... Line 85...
85
/////////////////////////////////////////////////////////////////////////////
85
/////////////////////////////////////////////////////////////////////////////
86
// Global Types
86
// Global Types
87
/////////////////////////////////////////////////////////////////////////////
87
/////////////////////////////////////////////////////////////////////////////
88
88
89
typedef union {
89
typedef union {
90
    can_packet_t  packet;
90
    mios32_can_packet_t  packet;
91
  struct {
91
  struct {
92
    can_ext_id_t id;
92
    mios32_can_ext_id_t id;
93
    can_ctrl_t ctrl;
93
    mios32_can_ctrl_t ctrl;
94
    can_data_t data;
94
    mios32_can_data_t data;
95
  };
95
  };
96
} mcan_packet_t;
96
} mios32_mcan_packet_t;
-
 
97
97
98
98
typedef union {
99
typedef union {
99
  struct {
100
  struct {
100
    can_ext_id_t id;
101
    mios32_can_ext_id_t id;
101
    u16 data_l;
102
    u16 data_l;
102
  };
103
  };
103
  struct {
104
  struct {
104
    u32 ext_id;
105
    u32 ext_id;
105
    u16 ports;
106
    u16 ports;
Line 118... Line 119...
118
    u32 vman_prio:3;
119
    u32 vman_prio:3;
119
    // ports
120
    // ports
120
    u8  src_port;
121
    u8  src_port;
121
    u8  dst_port;
122
    u8  dst_port;
122
  };
123
  };
123
} mcan_header_t;
124
} mios32_mcan_header_t;
124
125
125
126
126
/////////////////////////////////////////////////////////////////////////////
127
/////////////////////////////////////////////////////////////////////////////
127
// Prototypes
128
// Prototypes
128
/////////////////////////////////////////////////////////////////////////////
129
/////////////////////////////////////////////////////////////////////////////
Line 140... Line 141...
140
141
141
extern s32 MIOS32_CAN_MIDI_CheckAvailable(u8 cable);
142
extern s32 MIOS32_CAN_MIDI_CheckAvailable(u8 cable);
142
143
143
extern s32 MIOS32_CAN_MIDI_Periodic_mS(void);
144
extern s32 MIOS32_CAN_MIDI_Periodic_mS(void);
144
145
145
extern s32 MIOS32_CAN_MIDI_PacketTransmit_NonBlocking(mcan_packet_t p);
146
extern s32 MIOS32_CAN_MIDI_PacketTransmit_NonBlocking(mios32_mcan_packet_t p);
146
extern s32 MIOS32_CAN_MIDI_PacketTransmit(mcan_packet_t p);
147
extern s32 MIOS32_CAN_MIDI_PacketTransmit(mios32_mcan_packet_t p);
147
148
148
extern s32 MIOS32_CAN_MIDI_PacketSend_NonBlocking(mcan_header_t header, mios32_midi_package_t package);
149
extern s32 MIOS32_CAN_MIDI_PacketSend_NonBlocking(mios32_mcan_header_t header, mios32_midi_package_t package);
149
extern s32 MIOS32_CAN_MIDI_PacketSend(mcan_header_t header, mios32_midi_package_t package);
150
extern s32 MIOS32_CAN_MIDI_PacketSend(mios32_mcan_header_t header, mios32_midi_package_t package);
150
151
151
extern s32 MIOS32_CAN_MIDI_PackageSend_NonBlocking(mios32_midi_package_t package);
152
extern s32 MIOS32_CAN_MIDI_PackageSend_NonBlocking(mios32_midi_package_t package);
152
extern s32 MIOS32_CAN_MIDI_PackageSend(mios32_midi_package_t package);
153
extern s32 MIOS32_CAN_MIDI_PackageSend(mios32_midi_package_t package);
153
extern s32 MIOS32_CAN_MIDI_SysexRepackSend(mcan_header_t header, mios32_midi_package_t package);
154
extern s32 MIOS32_CAN_MIDI_SysexRepackSend(mios32_mcan_header_t header, mios32_midi_package_t package);
154
155
155
extern s32 MIOS32_CAN_MIDI_SysexSend_NonBlocking(mcan_header_t header, u8 *stream, u16 size);
156
extern s32 MIOS32_CAN_MIDI_SysexSend_NonBlocking(mios32_mcan_header_t header, u8 *stream, u16 size);
156
extern s32 MIOS32_CAN_MIDI_SysexSend(mcan_header_t header, u8 *stream, u16 size);
157
extern s32 MIOS32_CAN_MIDI_SysexSend(mios32_mcan_header_t header, u8 *stream, u16 size);
157
158
158
extern s32 MIOS32_CAN_MIDI_SysExStreamCallback_Init(s32 (*callback_sysex_stream)(mcan_header_t header, u8* stream, u16 size));
159
extern s32 MIOS32_CAN_MIDI_SysExStreamCallback_Init(s32 (*callback_sysex_stream)(mios32_mcan_header_t header, u8* stream, u16 size));
159
160
160
extern s32 MIOS32_CAN_MIDI_PackageCallback_Init(s32 (*direct_package_callback)(mcan_header_t header, mios32_midi_package_t package));
161
extern s32 MIOS32_CAN_MIDI_PackageCallback_Init(s32 (*direct_package_callback)(mios32_mcan_header_t header, mios32_midi_package_t package));
161
162
162
extern s32 MIOS32_CAN_MIDI_PackageReceive(mios32_midi_package_t *package);
163
extern s32 MIOS32_CAN_MIDI_PackageReceive(mios32_midi_package_t *package);
163
164
164
extern u32 MIOS32_CAN_MIDI_DefaultHeaderInit(mcan_header_t* header);
165
extern u32 MIOS32_CAN_MIDI_DefaultHeaderInit(mios32_mcan_header_t* header);
165
/////////////////////////////////////////////////////////////////////////////
166
/////////////////////////////////////////////////////////////////////////////
166
// Export global variables
167
// Export global variables
167
/////////////////////////////////////////////////////////////////////////////
168
/////////////////////////////////////////////////////////////////////////////
168
extern u8 mios32_mcan_id;
169
extern u8 mios32_mcan_id;
169
170