summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/HAL/drivers/USBFIFO/include/usbFifoVirtualUsart.h
blob: 7b000818baa42b05fb8f29b6cd1468dca0570291 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**************************************************************************//**
\file   usbFifoVirtualUsart.h

\brief  The declaration of interfunction interface.

\author
    Atmel Corporation: http://www.atmel.com \n
    Support email: avr@atmel.com

  Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
  Licensed under Atmel's Limited License Agreement (BitCloudTM).

\internal
  History:
    15.07.11 A. Khromykh - Created
*******************************************************************************/
#ifndef _USBFIFOVIRTUALUSART_H
#define _USBFIFOVIRTUALUSART_H

/******************************************************************************
                   Includes section
******************************************************************************/
#include <gpio.h>

/******************************************************************************
                   Prototypes section
******************************************************************************/
#if defined(ATMEGA128RFA1)

// the macros for the manipulation by PC6 for binary decoder
HAL_ASSIGN_PIN(PC6, D, 6);
// the macros for the manipulation by PC7 for binary decoder
HAL_ASSIGN_PIN(PC7, D, 7);
// the macros for the manipulation by RD
HAL_ASSIGN_PIN(RD, E, 5);
// the macros for the manipulation by WR
HAL_ASSIGN_PIN(WR, E, 4);

#elif defined(ATMEGA1281) || defined(ATMEGA2561)

// the macros for the manipulation by PC6 for binary decoder
HAL_ASSIGN_PIN(PC6, C, 6);
// the macros for the manipulation by PC7 for binary decoder
HAL_ASSIGN_PIN(PC7, C, 7);
// the macros for the manipulation by RD
HAL_ASSIGN_PIN(RD, G, 1);
// the macros for the manipulation by WR
HAL_ASSIGN_PIN(WR, G, 0);

#else
  #error 'USB FIFO is not supported for this mcu.'
#endif

/**************************************************************************//**
\brief Startup initialization.
******************************************************************************/
void usbfifoInit(void);

/**************************************************************************//**
\brief Clear startup initialization parameters
******************************************************************************/
void usbfifoUnInit(void);

/**************************************************************************//**
\brief  USB FIFO driver task handler.
******************************************************************************/
void usbfifoHandler(void);

#endif /* _USBFIFOVIRTUALUSART_H */