예제 #1
0
파일: acm.c 프로젝트: boydcase31/openiBoot
static void acm_started()
{
	acm_is_ready = 0;

	if(usb_get_speed() == USBHighSpeed)
		acm_usb_mps = 512;
	else
		acm_usb_mps = 0x80;

	usb_enable_endpoint(ACM_EP_SEND, USBIn, USBBulk, acm_usb_mps);
	usb_enable_endpoint(ACM_EP_RECV, USBOut, USBBulk, acm_usb_mps);

	acm_busy = FALSE;
	acm_file_ptr = NULL;
	acm_file_recv_left = 0;
	acm_file_send_left = 0;
	acm_unprocessed = 0;

	usb_receive_bulk(ACM_EP_RECV, acm_recv_buffer, acm_usb_mps);

	acm_send();
	acm_is_ready = 1;

	bufferPrintf("ACM: Ready.\n");
}
예제 #2
0
파일: acm.c 프로젝트: Cephrus/openiBoot
static void acm_buffer_notify(const char *text)
{
	if(acm_is_ready && !acm_busy)
		acm_send();

	if(acm_prev_printf_handler)
		acm_prev_printf_handler(text);
}
예제 #3
0
파일: acm.c 프로젝트: boydcase31/openiBoot
void acm_buffer_notify()
{
	if(!acm_busy)
		acm_send();
}
예제 #4
0
파일: acm.c 프로젝트: boydcase31/openiBoot
static void acm_sent(uint32_t _tkn, int32_t _amt)
{
	if(!acm_send())
		acm_busy = FALSE;
}
예제 #5
0
파일: acm.c 프로젝트: Cephrus/openiBoot
static void acm_sent(uint32_t _tkn, int32_t _amt)
{
	acm_send();
}