Microchip® Advanced Software Framework

divas.c File Reference

SAM Divide and Square Root Accelerator (DIVAS) Driver.

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

#include "divas.h"

Functions

void _system_divas_init (void)
 Initializes and enables the Divide and Square Root Accelerator (DIVAS) Driver. More...
 
int32_t divas_idiv (int32_t numerator, int32_t denominator)
 Signed division operation. More...
 
int32_t divas_idivmod (int32_t numerator, int32_t denominator)
 Signed division remainder operation. More...
 
uint32_t divas_sqrt (uint32_t radicand)
 Square root operation. More...
 
uint32_t divas_uidiv (uint32_t numerator, uint32_t denominator)
 Unsigned division operation. More...
 
uint32_t divas_uidivmod (uint32_t numerator, uint32_t denominator)
 Unsigned division remainder operation. More...
 
DIVAS Operation Overloading
int32_t __aeabi_idiv (int32_t numerator, int32_t denominator)
 Signed division operation overload. More...
 
uint32_t __aeabi_uidiv (uint32_t numerator, uint32_t denominator)
 Unsigned division operation overload. More...
 
uint64_t __aeabi_idivmod (int32_t numerator, int32_t denominator)
 Signed division remainder operation overload. More...
 
uint64_t __aeabi_uidivmod (uint32_t numerator, uint32_t denominator)
 Unsigned division remainder operation overload. More...
 

void _system_divas_init ( void  )

Initializes and enables the Divide and Square Root Accelerator (DIVAS) Driver.

Enable the clocks used by Divide and Square Root Accelerator (DIVAS) Driver. Enable leading zero optimization.

Note
When SYSTEM module is used, this function will be invoked by system_init() automatically if the module is included.

References system_ahb_clock_set_mask().

Referenced by system_init().