simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] simulavrxx timers


From: Michael Hennebry
Subject: Re: [Simulavr-devel] simulavrxx timers
Date: Sat, 31 May 2008 11:00:17 -0500 (CDT)

On Fri, 30 May 2008, Klaus Rudolph wrote:

> Michael Hennebry schrieb:
> > On Fri, 30 May 2008, Klaus Rudolph wrote:
> >
> >> Michael Hennebry schrieb:
> >>> In HWMegaTimer0::CpuCycle(),
> >>> there is an 8-case switch (tccr) statement.
> >>> Its cases are the possible clock select values.
> >>> Is that correct?
> >> Right!
> >>> tccr contains more than the CS bits,
> >>>
> >> Right! Rest of bits will compared in TimerCompareAfterCount();
> >
> > In HWMegaTimer0::CpuCycle(), why tccr and not tccr & 7?
>
> My version has:
> unsigned int HWMegaTimer0::CpuCycle(){
>      switch (tccr & 0x07) { // CS00..CS02
>
> ????

I seem to have the latest and greatest CVS copy:
> address@hidden src]$ ls -l CVS
> total 32
> -rw-rw-r-- 1 hennebry hennebry 4675 2008-02-10 17:07 Entries
> -rw-rw-r-- 1 hennebry hennebry   15 2008-01-12 20:10 Repository
> -rw-rw-r-- 1 hennebry hennebry   61 2008-01-12 20:10 Root
> -rw-rw-r-- 1 hennebry hennebry    0 2008-02-19 21:41 Template
> address@hidden src]$ grep hwmega CVS/Entries
> /hwmegaextirq.cpp/1.3/Sun Jan 13 02:10:23 2008//
> /hwmegaextirq.h/1.4/Sun Jan 13 02:10:23 2008//
> /hwmegatimer.cpp/1.5/Sun Jan 13 02:10:23 2008//
> /hwmegatimer.h/1.5/Sun Jan 13 02:10:23 2008//
> /hwmegatimer0123irq.cpp/1.2/Sun Jan 13 02:10:23 2008//
> /hwmegatimer0123irq.h/1.2/Sun Jan 13 02:10:23 2008//
> address@hidden src]$ cat CVS/Rep*
> simulavrxx/src
> address@hidden src]$ cat CVS/Root
> :pserver:address@hidden:/sources/simulavr
> address@hidden src]$ cvs diff hwmegatimer.cpp
> address@hidden src]$

> address@hidden src]$ grep -e 0::CpuCycle -e 'switch.*tccr\>' hwmegatimer.cpp
>                         switch(tccr&0x30) { //checking here for compare b
>                         switch(tccr&0x30) {
> unsigned int HWMegaTimer0::CpuCycle(){
>         switch (tccr) {
>                         switch(tccr&0x30) { //checking here for compare b
>                         switch(tccr&0x30) {
>         switch (tccr) {
> address@hidden src]$

-- 
Michael   address@hidden
"Those parts of the system that you can hit with a hammer (not advised)
are called Hardware;  those program instructions that you can only
curse at are called Software."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]