Data Structures
IO004.h File Reference

Detailed Description

Copyright (C) 2011 Infineon Technologies AG. All rights reserved.

Infineon Technologies AG (Infineon) is supplying this software for use with Infineon’s microcontrollers. This file can be freely distributed within development tools that are supporting such microcontrollers.

THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.

** ** PLATFORM : Infineon XMC4XXX Series/XMC1XXX Series ** ** COMPILER : Compiler Independent ** ** AUTHOR : App Developer ** ** MAY BE CHANGED BY USER [yes/no]: Yes ** ** MODIFICATION DATE : Dec 3, 2012 ** **

Header file for Software_Controlled_IO_IO004 App

#include <DAVE3.h>
#include "IO004_Conf.h"

Data Structures

struct  IO004_PORTS_TypeDef
struct  IO004_HandleType

Functions

void IO004_Init (void)
enum  IO004_InputModeType {
  IO004_TRISTATE, IO004_PULL_DOWN_DEVICE, IO004_PULL_UP_DEVICE, IO004_CONT_POLLING,
  IO004_INV_TRISTATE, IO004_INV_PULL_DOWN_DEVICE, IO004_INV_PULL_UP_DEVICE, IO004_INV_CONT_POLLING
}
enum  IO004_OutputModeType { IO004_PUSHPULL = 0x10, IO004_OPENDRAIN = 0x18 }
typedef struct IO004_HandleType IO004_HandleType
typedef enum IO004_InputModeType IO004_InputModeType
typedef enum IO004_OutputModeType IO004_OutputModeType
#define IO004_ReadPin(Handle)   (((Handle.PortRegs->IN) >> Handle.PortPin) & 1U)
#define IO004_SetPin(Handle)   ((Handle.PortRegs->OMR) |= (1U << Handle.PortPin))
#define IO004_SetOutputValue(Handle, Value)   (Handle.PortRegs->OMR |= Value ? (1U << Handle.PortPin):(0x10000UL << Handle.PortPin))
#define IO004_ResetPin(Handle)   ((Handle.PortRegs->OMR) |= (0x10000UL << Handle.PortPin))
#define IO004_TogglePin(Handle)   ((Handle.PortRegs->OMR) |= (0x10001UL << Handle.PortPin))
void IO004_DisableOutputDriver (const IO004_HandleType *Handle, IO004_InputModeType Mode)
void IO004_EnableOutputDriver (const IO004_HandleType *Handle, IO004_OutputModeType Mode)

Typedef Documentation

This data type describes the App Handle

This data type describes the Input Mode type

This data type describes the Output Mode type


Enumeration Type Documentation

This data type describes the Input Mode type

Enumerator:
IO004_TRISTATE 

Tri-state

IO004_PULL_DOWN_DEVICE 

Input pull-down device connected

IO004_PULL_UP_DEVICE 

Input pull-up device connected

IO004_CONT_POLLING 

Pn_OUTx continuously polls the input value

IO004_INV_TRISTATE 

Inverted tri-state

IO004_INV_PULL_DOWN_DEVICE 

Inverted Input pull-down device connected

IO004_INV_PULL_UP_DEVICE 

Inverted Input pull-up device connected

IO004_INV_CONT_POLLING 

Inverted Pn_OUTx continuously polls the input value

This data type describes the Output Mode type

Enumerator:
IO004_PUSHPULL 

Push pull output

IO004_OPENDRAIN 

Open drain output

Go to the source code of this file.