summaryrefslogtreecommitdiff
path: root/chip/stm32/usb-stm32f3.c
blob: eb48129e090a082fb9a333dfc1ca0167f7bbf500 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Copyright 2014 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * STM32F3 Family specific USB functionality
 */

#include "usb-stm32f3.h"

#include "system.h"
#include "usb_api.h"

void usb_connect(void)
{
	/* USB is in use */
	disable_sleep(SLEEP_MASK_USB_DEVICE);

	usb_board_connect();
}

void usb_disconnect(void)
{
	usb_board_disconnect();

	/* USB is off, so sleep whenever */
	enable_sleep(SLEEP_MASK_USB_DEVICE);
}