OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [CORTEX_EFMG890F128_IAR/] [bsp/] [dvk_boardcontrol.h] - Blame information for rev 636

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 595 jeremybenn
/**************************************************************************//**
2
 * @file
3
 * @brief DVK Peripheral Board Control, prototypes and definitions
4
 * @author Energy Micro AS
5
 * @version 1.0.1
6
 ******************************************************************************
7
 * @section License
8
 * <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
9
 ******************************************************************************
10
 *
11
 * This source code is the property of Energy Micro AS. The source and compiled
12
 * code may only be used on Energy Micro "EFM32" microcontrollers.
13
 *
14
 * This copyright notice may not be removed from the source code nor changed.
15
 *
16
 * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
17
 * obligation to support this Software. Energy Micro AS is providing the
18
 * Software "AS IS", with no express or implied warranties of any kind,
19
 * including, but not limited to, any implied warranties of merchantability
20
 * or fitness for any particular purpose or warranties against infringement
21
 * of any proprietary rights of a third party.
22
 *
23
 * Energy Micro AS will not be liable for any consequential, incidental, or
24
 * special damages, or any other relief, or for any claim by any third party,
25
 * arising from your use of this Software.
26
 *
27
 *****************************************************************************/
28
 
29
#ifndef __DVK_BOARDCONTROL_H
30
#define __DVK_BOARDCONTROL_H
31
 
32
#include <stdint.h>
33
#include "dvk_bcregisters.h"
34
 
35
/** Periperhal access switches */
36
typedef enum
37
{
38
  DVK_ACCEL          = BC_PERCTRL_ACCEL,
39
  DVK_AMBIENT        = BC_PERCTRL_AMBIENT,
40
  DVK_POTMETER       = BC_PERCTRL_POTMETER,
41
  DVK_RS232A         = BC_PERCTRL_RS232A,
42
  DVK_RS232B         = BC_PERCTRL_RS232B,
43
  DVK_SPI            = BC_PERCTRL_SPI,
44
  DVK_I2C            = BC_PERCTRL_I2C,
45
  DVK_IRDA           = BC_PERCTRL_IRDA,
46
  DVK_ANALOG_SE      = BC_PERCTRL_ANALOG_SE,
47
  DVK_ANALOG_DIFF    = BC_PERCTRL_ANALOG_DIFF,
48
  DVK_AUDIO_OUT      = BC_PERCTRL_AUDIO_OUT,
49
  DVK_AUDIO_IN       = BC_PERCTRL_AUDIO_IN,
50
  DVK_ACCEL_GSEL     = BC_PERCTRL_ACCEL_GSEL,
51
  DVK_ACCEL_SELFTEST = BC_PERCTRL_ACCEL_SELFTEST,
52
  DVK_RS232_SHUTDOWN = BC_PERCTRL_RS232_SHUTDOWN,
53
  DVK_IRDA_SHUTDOWN  = BC_PERCTRL_IRDA_SHUTDOWN,
54
} DVKPeripheral;
55
 
56
/* Peripheral Control */
57
void DVK_enablePeripheral(DVKPeripheral peri);
58
void DVK_disablePeripheral(DVKPeripheral peri);
59
void DVK_enableBus(void);
60
void DVK_disableBus(void);
61
 
62
/* Read board controllers */
63
uint16_t DVK_getPushButtons(void);
64
uint16_t DVK_getJoystick(void);
65
uint16_t DVK_getDipSwitch(void);
66
 
67
/* Report AEM status */
68
void DVK_setEnergyMode(uint16_t energyMode);
69
 
70
/* User LEDs */
71
void DVK_setLEDs(uint16_t leds);
72
uint16_t DVK_getLEDs(void);
73
 
74
/* Interrupt callback */
75
void DVK_enableInterrupt(uint16_t flags);
76
void DVK_disableInterrupt(uint16_t flags);
77
 
78
uint16_t DVK_getInterruptFlags(void);
79
void DVK_clearInterruptFlags(uint16_t flags);
80
 
81
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.