LINE
This file contains hidden or 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
import bleio | |
import board | |
import digitalio | |
import time | |
import binascii | |
import microcontroller | |
# User service UUID: Change this to your generated service UUID | |
USER_SERVICE_UUID = "91E4E176-D0B9-464D-9FE4-52EE3E9F1552" | |
# User service characteristics |
This file contains hidden or 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 <bluefruit.h> | |
#include <Wire.h> | |
/** | |
* BLE Plantation Kit (Capacitive soil moisture sensor and water pump) | |
* Sensor: https://www.dfrobot.com/wiki/index.php/Capacitive_Soil_Moisture_Sensor_SKU:SEN0193 | |
* Water pump: http://blog.digit-parts.com/archives/52070424.html | |
*/ | |
// Device Name: Maximum 30 bytes |
This file contains hidden or 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
# http://www.coins.tsukuba.ac.jp/~syspro/2015/shui/1stHalf.html#sec:indentation | |
# 以下のコマンドで、大体上記のスタイルに適合するように、自動でスタイルを修正してくれる | |
# 綺麗で美しいコードを書こう。 | |
$ indent -nbad -bap -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -d0 -di1 -nfc1 -i8 -ip0 -l80 -lp -npcs -npsl -sob -nut test.c |
This file contains hidden or 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
function (int * array, int n) | |
{ | |
long unsigned int D.1839; | |
long unsigned int D.1840; | |
int * D.1841; | |
int D.1842; | |
int i; | |
i = 0; | |
goto <D.1836>; |
This file contains hidden or 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
00000000 <function>: | |
0: 55 push %ebp | |
1: 89 e5 mov %esp,%ebp | |
3: 83 ec 10 sub $0x10,%esp | |
6: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) | |
d: eb 1c jmp 2b <function+0x2b> | |
f: 8b 45 fc mov -0x4(%ebp),%eax | |
12: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx | |
19: 8b 45 08 mov 0x8(%ebp),%eax | |
1c: 01 c2 add %eax,%edx |
This file contains hidden or 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
以下のようなC言語の関数functionがあるとします。 | |
void function(int *array, int n) { | |
int i; | |
for(i = 0; i < n; i++) { | |
array[i] = i * n; | |
} | |
} | |
上記プログラムをコンパイルした結果の一例 (i386)は以下となりました。 |
This file contains hidden or 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> | |
int main(void) | |
{ | |
volatile char test, i; | |
__asm__ volatile("mov $82, %0 \n" | |
"mov $0, %1 \n" | |
"addb $127, %0 \n" | |
"jno hogehoge \n" |
This file contains hidden or 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
import pyb | |
from pyb import I2C | |
from pyb import Pin | |
DEVICE_ADDR = 0x4a | |
BEEPTONE_ADDR = 0x1e | |
class CS43L22: | |
def __init__(self): | |
self.reset = Pin(Pin.board.PD4, Pin.OUT_PP) |
This file contains hidden or 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 <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#include <immintrin.h> | |
#define LENGTH 1000000010 | |
/* | |
coins syspro strlen() |
NewerOlder