I have changed delay() from a class to a simple C and saved 5kB we need to look why classes are taking so much place
parent
76c339af27
commit
aeda7542d3
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef _DELAY_H_
|
||||||
|
#define _DELAY_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
void delayMs(uint16_t delay);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@ -1,16 +0,0 @@
|
|||||||
#ifndef _DELAY_H_
|
|
||||||
#define _DELAY_H_
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
class Delay
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Delay();
|
|
||||||
~Delay();
|
|
||||||
void ms(uint16_t delay);
|
|
||||||
private:
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
|||||||
|
#include "delay.h"
|
||||||
|
#include "../Inc/stm32f0xx_csl.h"
|
||||||
|
|
||||||
|
void delayMs(uint16_t delay)
|
||||||
|
{
|
||||||
|
LL_mDelay(delay);
|
||||||
|
}
|
@ -1,17 +0,0 @@
|
|||||||
#include "delay.hpp"
|
|
||||||
#include "../Inc/stm32f0xx_csl.h"
|
|
||||||
|
|
||||||
Delay::Delay()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Delay::~Delay()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void Delay::ms(uint16_t delay)
|
|
||||||
{
|
|
||||||
LL_mDelay(delay);
|
|
||||||
}
|
|
Loading…
Reference in new issue