miniFOC 1.0.3
This open-source project aims to accomplish a FOC(Field Oriented Control) scheme that is operatable with minimum costs in China.
Functions
system.h File Reference

system basic function header file More...

Go to the source code of this file.

Functions

void systick_config (void)
 initialize systick timer to implementation delay function More...
 
void delayms (unsigned long count)
 millisecond delay function, any time time. More...
 
void delay_decrement (void)
 delay counter decrement function, called by systick handler More...
 
void user_memset (void *buf, unsigned char data, unsigned char num)
 format buffer array to fixed value, replace memset function More...
 
unsigned int float_to_int32 (float data0)
 convert floating point numbers to int32 type data More...
 
float int32_to_float (unsigned int data0)
 convert int32 to floating point numbers type data More...
 

Detailed Description

system basic function header file

Author
Lao·Zhu
Version
V1.0.1
Date
9. October 2021

Definition in file system.h.

Function Documentation

◆ delay_decrement()

void delay_decrement ( void  )

delay counter decrement function, called by systick handler

Definition at line 38 of file system.c.

References delayms_counter.

Referenced by SysTick_Handler().

◆ delayms()

void delayms ( unsigned long  count)

millisecond delay function, any time time.

Parameters
[in]counttime to delay (in milliseconds)

Definition at line 30 of file system.c.

References delayms_counter.

Referenced by encoder_zeroing(), foc_calibrate_phase(), main(), and report_local_variable().

◆ float_to_int32()

unsigned int float_to_int32 ( float  data0)

convert floating point numbers to int32 type data

Parameters
[in]data0floating point type data to be converted
Return values
convertedint32 type data

Definition at line 60 of file system.c.

Referenced by flash_write_parameters(), report_angle_speed(), and report_local_variable().

◆ int32_to_float()

float int32_to_float ( unsigned int  data0)

convert int32 to floating point numbers type data

Parameters
[in]data0int32 type data to be converted
Return values
convertedfloating point type data

Definition at line 70 of file system.c.

Referenced by flash_read_parameters(), and mdtp_callback_handler().

◆ systick_config()

void systick_config ( void  )

initialize systick timer to implementation delay function

Definition at line 20 of file system.c.

Referenced by main().

◆ user_memset()

void user_memset ( void *  buf,
unsigned char  data,
unsigned char  num 
)

format buffer array to fixed value, replace memset function

Parameters
[in,out]bufarray to format
[in]datavalue to be formatted as
[in]numnumber of elements to format

Definition at line 49 of file system.c.

Referenced by filter_coefficient_config(), mdtp_receive_handler(), and pid_config().