Contiki-Inga 3.x
|
Files | |
file | pic32.h |
PIC32MX initialization routines. | |
file | slip-uart.c |
PIC32MX Slip interface routines. | |
file | pic32_clock.c |
CLOCK interface for PIC32MX (pic32mx795f512l) | |
file | pic32_clock.h |
CLOCK interface for PIC32MX (pic32mx795f512l) | |
file | pic32_irq.h |
INTERRUPT interface for PIC32MX (pic32mx795f512l) | |
file | pic32_spi.c |
SPI interface for PIC32MX (pic32mx795f512l) | |
file | pic32_spi.h |
SPI interface for PIC32MX (pic32mx795f512l) | |
file | pic32_timer.c |
TIMER interface for PIC32MX (pic32mx795f512l) | |
file | pic32_timer.h |
TIMER interface for PIC32MX (pic32mx795f512l) | |
file | pic32_uart.c |
UART Interface for PIC32MX (pic32mx795f512l) | |
file | pic32_uart.h |
UART Interface for PIC32MX (pic32mx795f512l) | |
Functions | |
clock_time_t | clock_time (void) |
Get the current clock time. More... | |
unsigned long | clock_seconds (void) |
Get the current value of the platform seconds. More... | |
void | clock_set_seconds (unsigned long sec) |
Set the value of the platform seconds. More... | |
void | clock_delay_usec (uint16_t dt) |
Delay a given number of microseconds. More... | |
uint32_t | pic32_clock_get_system_clock (void) |
Calculate the system clock. More... | |
uint32_t | pic32_clock_get_peripheral_clock (void) |
Calculate the peripheral clock. More... | |
void clock_delay_usec | ( | uint16_t | dt | ) |
Delay a given number of microseconds.
dt | How many microseconds to delay. |
Definition at line 126 of file clock.c.
References pic32_clock_get_system_clock().
unsigned long clock_seconds | ( | void | ) |
Get the current value of the platform seconds.
Return seconds, default is time since startup.
This could be the number of seconds since startup, or since a standard epoch.
The comparison avoids the need to disable clock interrupts for an atomic read of the four-byte variable.
void clock_set_seconds | ( | unsigned long | sec | ) |
clock_time_t clock_time | ( | void | ) |
Get the current clock time.
Return the tick counter.
This function returns the current system clock time.
When 16 bit it typically wraps every 10 minutes. The comparison avoids the need to disable clock interrupts for an atomic read of the multi-byte variable.
uint32_t pic32_clock_get_peripheral_clock | ( | void | ) |
Calculate the peripheral clock.
Definition at line 96 of file pic32_clock.c.
References pic32_clock_get_system_clock().
uint32_t pic32_clock_get_system_clock | ( | void | ) |
Calculate the system clock.
Definition at line 82 of file pic32_clock.c.
Referenced by clock_delay_usec(), and pic32_clock_get_peripheral_clock().