Tutti Nuovi

user:thomas utente che ha creato il gist

title:mygist titolo del gist

filename:myfile.txt nome di file nel gist

extension:yml estensione del file nel gist

language:go linguaggio del file nel gist

topic:homelab gists with given topic

Entra


Tutti Nuovi Entra

All gists matching topic c

Più recente creazione
Meno recente creazione
Più recente aggiornamento
Meno recente aggiornamento

PowLu / 嵌入式C非阻塞周期执行宏

0 mi piace
0 forks
2 files
Ultima volta attivo 1776395259
一个轻量级、可移植的C宏,用于按固定时间间隔执行代码,不阻塞主循环。适用于裸机STM32或FreeRTOS等嵌入式项目。
c embedded freertos macro stm32
1 // 例1:每500ms翻转一次LED
2 void main_loop(void) {
3 RUN_EVERY(500, led_tick, {
4 HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
5 });
6
7 // 其他非阻塞任务
8 read_sensor();
9 process_data();
10 }

PowLu / Freertos获取任务运行态参数

0 mi piace
0 forks
2 files
Ultima volta attivo 1776394742
获取任务运行时间、运行计数、栈占用
c embedded freertos stm32
1 /**
2 ******************************************************************************
3 * @file user\global\g_runtime.c
4 * @author luhuaishuai
5 * @version v0.1
6 * @date 2026-1-12
7 * @brief Briefly describe the function of your function
8 ******************************************************************************
9 */
Più nuovi Più vecchi

Creato da Opengist ⋅ Load: 19ms⋅

Italiano
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文