Example #1
0
File: uhi_cdc.c Project: marekr/asf
bool uhi_cdc_open(uint8_t port, usb_cdc_line_coding_t *configuration)
{
	// Send configuration
	if (!uhi_cdc_set_conf(port, configuration)) {
		return false;
	}
	// Send DTR
	if (!uhi_cdc_set_ctrl_line(port, CDC_CTRL_SIGNAL_DTE_PRESENT)) {
		return false;
	}
	return true;
}
Example #2
0
File: uhi_cdc.c Project: gstroe/Arm
bool uhi_cdc_open(uint8_t port, CDCLineCoding *configuration)
{
	// Send configuration
	if (!uhi_cdc_set_conf(port, configuration))
		return false;

	// Send DTR
	if (!uhi_cdc_set_ctrl_line(port, CDCControlLineState_DTE_PRESENT))
		return false;

	return true;
}
Example #3
0
File: uhi_cdc.c Project: marekr/asf
void uhi_cdc_close(uint8_t port)
{
	// Clear DTR
	uhi_cdc_set_ctrl_line(port, 0);
}