40 lines
1.7 KiB
C
40 lines
1.7 KiB
C
/*
|
|
* utilities.h
|
|
*
|
|
* Created on: 16 sep. 2016
|
|
* Author: Philip
|
|
*/
|
|
/**********************************************************************
|
|
* NAME: utilities.c *
|
|
* AUTHOR: Philip Johansson *
|
|
* PURPOSE: Set up and read from ADC *
|
|
* INFORMATION: *
|
|
* Here we gather usable functions by the whole system *
|
|
* *
|
|
* GLOBAL VARIABLES: *
|
|
* Variable Type Description *
|
|
* -------- ---- ----------- *
|
|
* *
|
|
**********************************************************************/
|
|
|
|
#ifndef UTILITIES_H_
|
|
#define UTILITIES_H_
|
|
|
|
#include <stdint.h>
|
|
#include "stm32f4xx_it.h"
|
|
|
|
/***********************************************************************
|
|
* BRIEF: Sums elements of array until index of second arg *
|
|
* INFORMATION: Returns the sum *
|
|
***********************************************************************/
|
|
uint32_t accumulate(uint32_t list[], int length);
|
|
|
|
/***********************************************************************
|
|
* BRIEF: A function that can be called on exceptions *
|
|
* INFORMATION: If an exception happens its easier to find it in an *
|
|
* infinite loop *
|
|
***********************************************************************/
|
|
void Error_Handler(void);
|
|
|
|
#endif /* UTILITIES_H_ */
|