13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C LanguageGet the value of the SPSR status register. Returns the value of the status register SPSR.__setspsrunsigned int volatile __setspsr( int set, int clear);Set or clear bits in the SPSR status register. Returns the new value of the SPSR status register.Example:#define SR_F 0x00000040#define SR_I 0x00000080i = __setspsr (0, SR_F | SR_I);if (i & (SR_F | SR_I)){exit (6); /* Interrupt flags not correct */}if (__getspsr () & (SR_F | SR_I)){exit (7); /* Interrupt flags not correct */}__getcpsrunsigned int volatile __getcpsr( void );Get the value of the CPSR status register. Returns the value of the status register CPSR.__setcpsrunsigned int volatile __setcpsr( int set, int clear);Set or clear bits in the CPSR status register. Returns the new value of the CPSR status register.__getapsrunsigned int volatile __getapsr( void );Get the value of the APSR status register (<strong>ARM</strong>v6-M and <strong>ARM</strong>v7-M). Returns the value of the statusregister APSR.__setapsrunsigned int volatile __setapsr( int set, int clear);Set or clear bits in the APSR status register (<strong>ARM</strong>v6-M and <strong>ARM</strong>v7-M). Returns the new value of theAPSR status register.29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!