RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Macros | Functions | Variables
clockdrv.c File Reference
#include <rtems.h>
#include <bsp.h>
#include <bsp/irq.h>
#include <rtems/bspIo.h>
#include "../../../shared/dev/clock/clockimpl.h"

Macros

#define CLOCK_VECTOR   AU1X00_IRQ_TOY_MATCH2
 
#define Clock_driver_support_at_tick(arg)
 
#define Clock_driver_support_install_isr(_new)
 
#define Clock_driver_support_initialize_hardware()
 
#define CLOCK_DRIVER_USE_DUMMY_TIMECOUNTER
 

Functions

void au1x00_clock_init (void)
 

Variables

uint32_t tick_interval
 
uint32_t last_match
 

Detailed Description

Instantiate the clock driver shell.

This uses the TOY (Time of Year) timer to implement the clock.

Macro Definition Documentation

◆ Clock_driver_support_at_tick

#define Clock_driver_support_at_tick (   arg)
Value:
do { \
while (AU1X00_SYS_CNTCTRL(AU1X00_SYS_ADDR) & AU1X00_SYS_CNTCTRL_TM0); \
last_match = AU1X00_SYS_TOYREAD(AU1X00_SYS_ADDR); \
AU1X00_SYS_TOYMATCH2(AU1X00_SYS_ADDR) = last_match + tick_interval; \
au_sync(); \
} while(0)

◆ Clock_driver_support_initialize_hardware

#define Clock_driver_support_initialize_hardware (   void)
Value:
do { \
au1x00_clock_init(); \
} while(0)

◆ Clock_driver_support_install_isr

#define Clock_driver_support_install_isr (   _new)
Value:
do { \
rtems_interrupt_handler_install( \
CLOCK_VECTOR, \
"clock", \
0, \
_new, \
NULL \
); \
AU1X00_IC_MASKCLR(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
AU1X00_IC_SRCSET(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
AU1X00_IC_CFG0SET(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
AU1X00_IC_CFG1CLR(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
AU1X00_IC_CFG2CLR(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
AU1X00_IC_ASSIGNSET(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
} while(0)