Quellcode durchsuchen

Merge pull request #355 from FrankBoesing/save-ram-with-progmem

Startup: save RAM with .progmem
main
Paul Stoffregen vor 6 Jahren
Ursprung
Commit
f3d9366a45
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
4 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  1. +1
    -0
      teensy4/AudioStream.cpp
  2. +1
    -0
      teensy4/analog.c
  3. +1
    -0
      teensy4/tempmon.c
  4. +1
    -1
      teensy4/usb.c

+ 1
- 0
teensy4/AudioStream.cpp Datei anzeigen



// Set up the pool of audio data blocks // Set up the pool of audio data blocks
// placing them all onto the free list // placing them all onto the free list
__attribute__((section(".progmem")))
void AudioStream::initialize_memory(audio_block_t *data, unsigned int num) void AudioStream::initialize_memory(audio_block_t *data, unsigned int num)
{ {
unsigned int i; unsigned int i;

+ 1
- 0
teensy4/analog.c Datei anzeigen



#define MAX_ADC_CLOCK 20000000 #define MAX_ADC_CLOCK 20000000


__attribute__((section(".progmem")))
void analog_init(void) void analog_init(void)
{ {
uint32_t mode, avg=0; uint32_t mode, avg=0;

+ 1
- 0
teensy4/tempmon.c Datei anzeigen

static uint32_t s_hotTemp, s_hotCount, s_roomC_hotC; static uint32_t s_hotTemp, s_hotCount, s_roomC_hotC;
static float s_hot_ROOM; static float s_hot_ROOM;


__attribute__((section(".progmem")))
void tempmon_init(void) void tempmon_init(void)
{ {
// Notes: // Notes:

+ 1
- 1
teensy4/usb.c Datei anzeigen







__attribute__((section(".progmem")))
void usb_init(void) void usb_init(void)
{ {
// TODO: only enable when VBUS detected // TODO: only enable when VBUS detected

Laden…
Abbrechen
Speichern