Choco OS  V.0.16.9.0
Join to the chocolate world
oc_machine.h File Reference

The file with interface for the machine module. More...

#include <stdbool.h>
#include <oc_stdtypes.h>
#include <oc_rmaps.h>
#include <oc_channels.h>
#include <oc_pins.h>
#include <oc_ba.h>
#include <oc_registers.h>
#include <oc_assert.h>
#include <oc_mcs.h>
#include <oc_machine_defs.h>

Go to the source code of this file.

Macros

#define oC_Machine_DmaSignalType_(NAME)
 returns name of DMA signal type for oC_Machine_DmaSignalType_t type
 
#define oC_Machine_DmaChannelAssignment_(DMA_CHANNEL_NAME, CHANNEL_NAME, SIGNAL_TYPE, TYPE, ENC, ...)
 returns name of DMA channel assignments for oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignmentIndex_(DMA_CHANNEL_NAME, CHANNEL_NAME, SIGNAL_TYPE, TYPE, ENC, ...)
 returns index of DMA channel assignments
 
#define oC_Machine_RegisterIndirectDynamic(BaseAddress, RegisterOffset)
 allows for accessing registers in dynamic mode More...
 
#define oC_Machine_RegisterIndirectStaticOffset(BaseAddress, REGISTER_NAME)
 allows for accessing registers using register offset name More...
 
#define oC_Machine_RegisterIndirectStatic(BASE_NAME, REGISTER_NAME)
 allows for accessing registers using register offset name and base address name More...
 
#define oC_Machine_Register(Channel, REGISTER_NAME)
 allows for accessing registers using channel and offset name More...
 
#define oC_Machine_GetRegisterAddress(Channel, REGISTER_NAME)
 returns register address according to the channel and register name More...
 
#define oC_Machine_IsRegisterWritable(REGISTER_NAME)
 checks if register is writable More...
 
#define oC_Machine_IsRegisterReadable(REGISTER_NAME)
 checks if register is readable More...
 
#define oC_Machine_WriteRegisterDirectStaticOffset(Channel, REGISTER_NAME, Value)
 macro for writing registers by using register name More...
 
#define oC_Machine_WriteRegister(Channel, REGISTER_NAME, Value)
 redefinition of oC_Machine_WriteRegisterDirectStaticOffset
 
#define oC_Machine_ReadRegisterDirectStaticOffset(Channel, REGISTER_NAME)
 allows read register by using register name More...
 
#define oC_Machine_ReadRegister(Channel, REGISTER_NAME)
 redefinition of oC_Machine_ReadRegisterDirectStaticOffset
 
#define oC_Machine_DmaSignalTypeMask
 mask with all bit set for oC_Machine_DmaSignalType_t type
 
#define oC_Machine_DmaEncodingValueMask
 mask for oC_Machine_DmaEncodingValue_t type
 
#define oC_Machine_DmaChannelAssignment_DmaChannelMaskWidth
 width of DMA channel field in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_ChannelMaskWidth
 width of channel field in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_DmaSignalTypeMaskWidth
 width of DMA Signal Type field in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_DmaEncodingValueMaskWidth
 width of DMA encoding value field in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_MaskWidth
 width of #oC_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_DmaChannelMaskStartBit
 start bit for DMA channel field in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_ChannelMaskStartBit
 start bit for channel field in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_DmaSignalTypeMaskStartBit
 start bit for DMA signal type field in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_DmaEncodingValueMaskStartBit
 start bit for DMA encoding value field in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_DmaChannelMask
 mask for DMA channel field in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_ChannelMask
 mask for channel field in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_DmaSignalTypeMask
 mask for DMA signal type field in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_DmaEncodingValueMask
 mask for DMA encoding value field in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignmentMask
 mask for all bits set in oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_GetDmaChannel(Assignment)
 returns DMA channel from oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_GetChannel(Assignment)
 returns channel from oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_GetDmaSignalType(Assignment)
 returns DMA signal type from oC_Machine_DmaChannelAssignment_t type
 
#define oC_Machine_DmaChannelAssignment_GetDmaEncodingValue(Assignment)
 returns DMA encoding value from oC_Machine_DmaChannelAssignment_t type
 

Typedefs

typedef uint8_t oC_Machine_DmaEncodingValue_t
 type for storing DMA encoding value
 

Enumerations

Functions

static bool oC_Machine_IsPowerRegisterSet (oC_Channel_t Channel)
 checks if power for channel is turn on More...
 
static oC_Power_t oC_Machine_GetPowerStateForChannel (oC_Channel_t Channel)
 returns power state for channel More...
 
static bool oC_Machine_SetPowerStateForChannel (oC_Channel_t Channel, oC_Power_t Power)
 configures power state for machine channel More...
 
static bool oC_Machine_IsChannelPoweredOn (oC_Channel_t Channel)
 checks if channel is powered on More...
 
static const char * oC_Machine_GetChannelName (oC_Channel_t Channel)
 returns printable name of channel More...
 
static bool oC_Machine_WriteRegisterDirectDynamic (oC_Channel_t Channel, oC_RegisterOffset_t RegisterOffset, oC_Register_t Value)
 writes machine register More...
 
static oC_Register_t oC_Machine_ReadRegisterDirectDynamic (oC_Channel_t Channel, oC_RegisterOffset_t RegisterOffset)
 reads machine register More...
 

Variables

const oC_Machine_DmaChannelAssignment_t oC_DmaChannelAssignments [oC_Machine_DmaChannelAssignmentIndex_NumberOfElements]
 array with DMA channel assignments More...
 

Detailed Description


Author
Patryk Kubiak
Note
Copyright (C) 2015 Patryk Kubiak patry.nosp@m.k.ku.nosp@m.biak9.nosp@m.0@gm.nosp@m.ail.c.nosp@m.om

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Definition in file oc_machine.h.

Variable Documentation

const oC_Machine_DmaChannelAssignment_t oC_DmaChannelAssignments[oC_Machine_DmaChannelAssignmentIndex_NumberOfElements]

The array contains channel assignments for DMA.

Definition at line 496 of file oc_machine.h.