Contiki-NG
Modules | Files | Functions
The nRF52840 System-on-Chip

This group documents the Nordic Semiconductor nRF52840 CPU. More...

Modules

 Device drivers
 

Files

file  dbg.c
 Hardware specific implementation of putchar() and puts() functions.
 
file  rtimer-arch.c
 Architecture dependent rtimer implementation header file.
 
file  rtimer-arch.h
 Architecture dependent rtimer implementation header file.
 

Functions

int dbg_putchar (int c)
 Print a character to debug output. More...
 
unsigned int dbg_send_bytes (const unsigned char *s, unsigned int len)
 Print a stream of bytes. More...
 
void rtimer_arch_init (void)
 Initialized the architecture-dependent part of rtimer. More...
 
void rtimer_arch_schedule (rtimer_clock_t t)
 Schedules an rtimer task to be triggered at time t. More...
 
rtimer_clock_t rtimer_arch_now ()
 Returns the current real-time clock time. More...
 

Detailed Description

This group documents the Nordic Semiconductor nRF52840 CPU.

Function Documentation

◆ dbg_putchar()

int dbg_putchar ( int  c)

Print a character to debug output.

Parameters
cCharacter to print
Returns
Printed character

Definition at line 59 of file dbg.c.

◆ dbg_send_bytes()

unsigned int dbg_send_bytes ( const unsigned char *  seq,
unsigned int  len 
)

Print a stream of bytes.

Parameters
seqA pointer to the stream
lenThe number of bytes to print
Returns
The number of printed bytes

Definition at line 71 of file dbg.c.

◆ rtimer_arch_init()

void rtimer_arch_init ( void  )

Initialized the architecture-dependent part of rtimer.

Initialized the architecture-dependent part of rtimer.

The Sleep Timer starts ticking automatically as soon as the device turns on. We don't need to turn on interrupts before the first call to rtimer_arch_schedule()

Initialized the architecture-dependent part of rtimer.

The RTC is initialised elsewhere

Initialized the architecture-dependent part of rtimer.

Definition at line 52 of file rtimer-arch.c.

◆ rtimer_arch_now()

rtimer_clock_t rtimer_arch_now ( void  )

Returns the current real-time clock time.

Returns
The current rtimer time in ticks
See also
RTIMER_NOW()
Returns
The current rtimer time in ticks

The value is read from the AON RTC counter and converted to a number of rtimer ticks

Returns
The current rtimer time in ticks
The current rtimer time in ticks

Definition at line 81 of file rtimer-arch.c.

◆ rtimer_arch_schedule()

void rtimer_arch_schedule ( rtimer_clock_t  t)

Schedules an rtimer task to be triggered at time t.

Schedule the call to rtimer_run_next at the time t.

Parameters
tThe time when the task will need executed.

t is an absolute time, in other words the task will be executed AT time t, not IN t rtimer ticks.

This function schedules a one-shot event with the nRF RTC.

Definition at line 75 of file rtimer-arch.c.