Open Garden  0.10.1-21
Macros | Functions | Variables
usb.h File Reference

usb connection related functions More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define USB_PORT   PORTD
 
#define USB_DDR   DDRD
 
#define USB_PORTIN   PIND
 
#define USB_PIN   PIND2
 
#define TRUE   1
 
#define FALSE   0
 

Functions

uint8_t usb_is_connected (void)
 
void usb_init (void)
 
void usb_shutdown (void)
 

Variables

volatile uint8_t usb_connected
 

Detailed Description

usb connection related functions

Macro Definition Documentation

◆ FALSE

#define FALSE   0

false

◆ TRUE

#define TRUE   1

true

◆ USB_DDR

#define USB_DDR   DDRD

usb port DDR.

◆ USB_PIN

#define USB_PIN   PIND2

usb pin.

◆ USB_PORT

#define USB_PORT   PORTD

usb port line.

◆ USB_PORTIN

#define USB_PORTIN   PIND

usb pin port.

Function Documentation

◆ usb_init()

void usb_init ( void  )

enable irq int0

◆ usb_is_connected()

uint8_t usb_is_connected ( void  )

check if usb port is connected.

◆ usb_shutdown()

void usb_shutdown ( void  )

disable INT0 irq

Variable Documentation

◆ usb_connected

volatile uint8_t usb_connected

Global used in interrupt. Global usb connected flag.