Microchip® Advanced Software Framework

fpu.h File Reference

FPU support for SAM.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <compiler.h>

Macros

#define ADDR_CPACR   0xE000ED88
 Address for ARM CPACR. More...
 
#define REG_CPACR   (*((volatile uint32_t *)ADDR_CPACR))
 CPACR Register. More...
 

Functions

static __always_inline void fpu_disable (void)
 Disable FPU. More...
 
static __always_inline void fpu_enable (void)
 Enable FPU. More...
 
static __always_inline bool fpu_is_enabled (void)
 Check if FPU is enabled. More...
 

#define ADDR_CPACR   0xE000ED88

Address for ARM CPACR.

#define REG_CPACR   (*((volatile uint32_t *)ADDR_CPACR))

CPACR Register.

Referenced by fpu_disable(), fpu_enable(), and fpu_is_enabled().

static __always_inline void fpu_disable ( void  )
static

Disable FPU.

References cpu_irq_restore(), cpu_irq_save(), flags, and REG_CPACR.

static __always_inline void fpu_enable ( void  )
static

Enable FPU.

References cpu_irq_restore(), cpu_irq_save(), flags, and REG_CPACR.

static __always_inline bool fpu_is_enabled ( void  )
static

Check if FPU is enabled.

Returns
Return ture if FPU is enabled, otherwise return false.

References REG_CPACR.