C++ build fixed, C dropped

This commit is contained in:
Attila Body 2020-11-28 12:18:35 +01:00
parent c34b20ad8c
commit a2f6e40abb
5 changed files with 335 additions and 1 deletions

19
inc/fault.h Normal file
View file

@ -0,0 +1,19 @@
#ifndef __FAULT_H
#define __FAULT_H
#define FAULT_REASON_HARD_FAULT 1
#define FAULT_REASON_MEMMANAGE_FAULT 2
#define FAULT_REASON_BUS_FAULT 3
#define FAULT_REASON_USAGE_FAULT 4
#ifdef __cplusplus
extern "C" {
#endif
void app_fault_callback(uint32_t reason);
#ifdef __cplusplus
}
#endif
#endif /* __FAULT_H */

31
inc/strutil.h Normal file
View file

@ -0,0 +1,31 @@
/*
* strutil.h
*
* Created on: Feb 11, 2017
* Author: compi
*/
#ifndef _STM32PLUS_STRUTIL_H_
#define _STM32PLUS_STRUTIL_H_
#include <stddef.h>
#include <inttypes.h>
#ifdef __cplusplus
extern "C" {
#endif
//////////////////////////////////////////////////////////////////////////////
size_t strcpy_ex(char *dst, char const *src);
size_t uitodec(char* buffer, uint32_t data);
size_t uitohex(char* buffer, uint32_t data, uint8_t chars);
size_t itodec(char* buffer, int data);
size_t itohex(char* buffer, int data);
void strrev(char *first, char *last);
char tochr(const uint8_t in, const uint8_t upper);
#ifdef __cplusplus
}
#endif
#endif /* _STM32PLUS_STRUTIL_H_ */