Skip to content

Instantly share code, notes, and snippets.

View KaeLL's full-sized avatar

Pedro KaeLL

  • Brazil
  • 01:15 (UTC -03:00)
View GitHub Profile
@boarchuz
boarchuz / esp_rtc_reset.c
Last active January 19, 2022 17:40
ESP32 RTC Reset
#include "soc/rtc_cntl_struct.h"
#include "hal/wdt_types.h"
#include "hal/rwdt_ll.h"
void __attribute__((noreturn)) esp_rtc_reset(void)
{
rwdt_ll_write_protect_disable(&RTCCNTL);
rwdt_ll_disable(&RTCCNTL);
rwdt_ll_config_stage(&RTCCNTL, WDT_STAGE0, 0, WDT_STAGE_ACTION_RESET_RTC);
rwdt_ll_disable_stage(&RTCCNTL, WDT_STAGE1);
@Chubek
Chubek / README.md
Last active May 31, 2023 13:46
Tools to Mix C and Assembly

This gist contains C preprocessor files to mix C and Assembly easier.

  • syscnr.inc includes all the Linux system call numbers.
  • registers.inc includes all the Linux ABI registers for both C and system calls. Arguments start at 0.
  • syscall.inc includes macros for syscalls based on argument number.

Please do not remove the newline at the end of each file. Head to my Github profile where you will find a lot of goodies, a lot of projects and the such and so. My project Panah has some good Assembly code mixed with C.

Enjoy.