This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.25) | |
project(test) | |
add_executable(hello hello.c) | |
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/include/foo.h | |
# Ninja always implicitly creates target directories | |
COMMAND mkdir -p include/ | |
COMMAND touch include/foo.h) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <libgen.h> | |
#include <ft2build.h> | |
#include FT_FREETYPE_H | |
#define DPI (96) /* device resolution */ | |
void die(void) | |
{ | |
printf("oops\n"); | |
exit(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digraph G { | |
edge [weight=10] | |
TAI -> UTC [label="−∆AT"]; | |
UTC -> UT1 [label="+∆UT1"] | |
UT1 -> TT [label="+∆T"] | |
TT -> TCG [label="linear"] | |
TCG -> TCB [label="4 D"] | |
TCB -> TDB [label="Linear"] | |
edge [weight=2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "SpiceUsr.h" | |
int main() | |
{ | |
SpiceBoolean found; | |
SpiceInt nr; | |
SpiceDouble radii[3]; | |
SpiceInt code; | |
SpiceChar name[] = "Io"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To emulate `hashFiles()` in GitHub Actions with `sha256sum`, you can do | |
```shell | |
sha256sum file | cut -f1 -d ' ' | xxd -r -p | sha256sum | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <zephyr.h> | |
#include <sys/printk.h> | |
#include <sys/ring_buffer.h> | |
#define RING_BUF_SIZE 10 | |
RING_BUF_ITEM_DECLARE_SIZE(ringbuf, RING_BUF_SIZE); | |
void dump(struct ring_buf *r, uint32_t ret) | |
{ | |
printk("ret %3u, size %3u space %3u head %3u tail %3u\n", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <drivers/led.h> | |
void main(void) | |
{ | |
const struct device *led = device_get_binding("SC LED"); | |
while (1) { | |
led_on(led, 1); | |
k_msleep(1000); | |
led_off(led, 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <zephyr.h> | |
#define MY_STACK_SIZE 5000 | |
K_THREAD_STACK_DEFINE(preempt_stack, MY_STACK_SIZE); | |
struct k_thread preempt_thread; | |
K_THREAD_STACK_DEFINE(coop_stack, MY_STACK_SIZE); | |
struct k_thread coop_thread; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit f6d27ac92 | |
Author: Yasushi SHOJI <y-shoji@ispace-inc.com> | |
Date: Wed Sep 26 00:06:46 2018 +0900 | |
add cgt support | |
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 42cbfc88f..2f72fc7eb 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import sys | |
import re | |
import subprocess | |
import argparse | |
import unittest | |
compiler_options = [ |