forked from PAWPAW-Mirror/lib_xua
Consolidated MAX_IAP_PACKET_SIZE and IAP_USB_BUFFER_TO_HOST_SIZE into a single define: IAP_MAX_PACKET_SIZE
This commit is contained in:
@@ -162,8 +162,8 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
|
|||||||
|
|
||||||
#ifdef IAP
|
#ifdef IAP
|
||||||
xc_ptr iap_from_host_rdptr;
|
xc_ptr iap_from_host_rdptr;
|
||||||
unsigned char iap_from_host_buffer[MAX_IAP_PACKET_SIZE+4];
|
unsigned char iap_from_host_buffer[IAP_MAX_PACKET_SIZE+4];
|
||||||
unsigned char iap_to_host_buffer[MAX_IAP_PACKET_SIZE];
|
unsigned char iap_to_host_buffer[IAP_MAX_PACKET_SIZE];
|
||||||
|
|
||||||
int is_ack_iap;
|
int is_ack_iap;
|
||||||
int is_reset;
|
int is_reset;
|
||||||
@@ -632,7 +632,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (iap_data_collected_from_device < IAP_USB_BUFFER_TO_HOST_SIZE)
|
if (iap_data_collected_from_device < IAP_MAX_PACKET_SIZE)
|
||||||
{
|
{
|
||||||
/* There is room in the collecting buffer for the data.. */
|
/* There is room in the collecting buffer for the data.. */
|
||||||
iap_to_host_buffer[iap_data_collected_from_device] = datum_iap;
|
iap_to_host_buffer[iap_data_collected_from_device] = datum_iap;
|
||||||
|
|||||||
Reference in New Issue
Block a user