Skip to content

Instantly share code, notes, and snippets.

View khwas's full-sized avatar
🐢
turtling some hobby electronics project

VasiliyK khwas

🐢
turtling some hobby electronics project
  • Greater Boston, MA
View GitHub Profile
@khwas
khwas / gist:062041f70cc3f5c8c8820184c0fe327e
Last active March 17, 2017 01:36
How to target Cortex-M Rust on Linux subsystem for Windows
DOS> lxrun /install
DOS> bash
sudo apt-get install build-essential
sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi
sudo apt-get update
sudo apt-get upgrade
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=nightly
export PATH="$HOME/.cargo/bin:$PATH"
cargo install xargo
rustup component add rust-src
@khwas
khwas / ILI9341
Last active November 29, 2015 22:49
QVGA over SPI Initialization, choosing left top, orientation and X, Y meaning, rectangles, lines, colors. Speed test
#include <Wire.h> // Use Wire according to arcticle https://garretlabs.wordpress.com/2014/03/18/the-dark-side-of-porting-arduino-sketches-on-intel-galileo-part-one/
int RESET_PIN = 8;
int DC_PIN = 9;
int CS_PIN = 7;
int MOSI_PIN = 2;
int MISO_PIN = 12;
int SCK_PIN = 3;
//TFT resolution 240*320
@khwas
khwas / gist:3bbeb67d944656dbd52c
Last active August 29, 2015 14:02
Json style of embeeding gist from github using plain HTML and scripts
// Original article https://bensmann.no/dynamically-embedding-gists/
// … find all gist scripts inside the ajax container
var $gists = $ajax_container.find('script[src^="https://gist.github.com/"]');
// if gist embeds are found
if( $gists.length ){
// update each gist
$gists.each(function(){
@khwas
khwas / lcd_defines.h
Created February 26, 2014 12:19
XMOS settings file for LCD screen S92048AAA. Put it next to other lcd_defines_XXXXX.h files and add reference to to lcd_conf.h
#ifndef __LCD_DEFINES_H__
#define __LCD_DEFINES_H__
#include "lcd_conf.h"
#include "lcd_defines_AT043TN24V7.h"
#include "lcd_defines_K430WQAV4F.h"
#include "lcd_defines_K70DWN0V1F.h"
#include "lcd_defines_S92048AAA.h"