Loading...
Searching...
No Matches
cpu.h File Reference

Texas Instruments MSP430 specific code. More...

Detailed Description

Texas Instruments MSP430 specific code.

Texas Instruments MSP430 specific code

Definition in file cpu.h.

#include <stdint.h>
#include <msp430.h>
#include "sched.h"
#include "thread.h"
+ Include dependency graph for cpu.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define WORDSIZE   16
 Wordsize in bit for MSP430 platforms.
 
#define PROVIDES_PM_SET_LOWEST
 MSP430 has power management support.
 
#define ISR(a, b)   void __attribute__((naked, interrupt (a))) b(void)
 Macro for defining interrupt service routines.
 
volatile int __irq_is_in
 The current ISR state (inside or not)
 
static void __save_context (void)
 Save the current thread context from inside an ISR.
 
static void __restore_context (void)
 Restore the thread context from inside an ISR.
 
static void __enter_isr (void)
 Run this code on entering interrupt routines.
 
static void __exit_isr (void)
 Run this code on exiting interrupt routines.
 
static uintptr_t cpu_get_caller_pc (void)
 Returns the last instruction's address.
 

Macro Definition Documentation

◆ ISR

#define ISR (   a,
 
)    void __attribute__((naked, interrupt (a))) b(void)

Macro for defining interrupt service routines.

Definition at line 47 of file cpu.h.

◆ PROVIDES_PM_SET_LOWEST

#define PROVIDES_PM_SET_LOWEST

MSP430 has power management support.

Definition at line 42 of file cpu.h.

◆ WORDSIZE

#define WORDSIZE   16

Wordsize in bit for MSP430 platforms.

Definition at line 37 of file cpu.h.

Function Documentation

◆ __enter_isr()

static void __enter_isr ( void  )
inlinestatic

Run this code on entering interrupt routines.

Definition at line 100 of file cpu.h.

◆ __exit_isr()

static void __exit_isr ( void  )
inlinestatic

Run this code on exiting interrupt routines.

Definition at line 119 of file cpu.h.

◆ __restore_context()

static void __restore_context ( void  )
inlinestatic

Restore the thread context from inside an ISR.

Definition at line 78 of file cpu.h.

◆ __save_context()

static void __save_context ( void  )
inlinestatic

Save the current thread context from inside an ISR.

Definition at line 57 of file cpu.h.

◆ cpu_get_caller_pc()

static uintptr_t cpu_get_caller_pc ( void  )
inlinestatic

Returns the last instruction's address.

Definition at line 134 of file cpu.h.