Skip to content

Commit

Permalink
added configs
Browse files Browse the repository at this point in the history
  • Loading branch information
tehn committed Dec 21, 2017
1 parent d1b4cd3 commit ddcfa3f
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 30 deletions.
72 changes: 72 additions & 0 deletions config/config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# kernel=vmlinuz-4.9.47-rt37-v7+


# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
#dtparam=audio=on
enable_uart=1

# Enable i2s-mmap functionality
dtoverlay=i2s-mmap

# Enable monome-snd (loads snd_soc_monome)
dtoverlay=monome

dtoverlay=bq27441

dtoverlay=gpio-poweroff:gpiopin=12,active_low=1

dtoverlay=ssd1322-spi
22 changes: 22 additions & 0 deletions config/rc.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi

/home/pi/init-norns.sh

exit 0
11 changes: 7 additions & 4 deletions image.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,13 @@ make menuconfig
Frame buffer Devices --->
Support for small TFT LCD display modules --->

still need >>>
autoload fb module
https://github.com/alidaf/raspberryPi/blob/master/displayPi/ssd1322-spi/fbtft/ssd1322-spi-overlay.dts
https://github.com/alidaf/raspberryPi/wiki/SSD1322(SPI)--fbtft-framebuffer-driver
install overlay for ssd1322
add to config.txt
dtoverlay=ssd1322-spi


add to /etc/rc.local (before exit 0)
/home/pi/init-norns.sh



46 changes: 20 additions & 26 deletions scripts/init-norns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,26 @@ echo "36" > /sys/class/gpio/export
echo "37" > /sys/class/gpio/export
echo "39" > /sys/class/gpio/export

sleep 0.5

echo "in" > /sys/class/gpio/gpio28/direction
# turn analog gain stages to unity

sudo i2cset -y 1 0x28 0
sudo i2cset -y 1 0x28 64
sudo i2cset -y 1 0x29 0
sudo i2cset -y 1 0x29 64


# unmute soundcard output

amixer set Master on


# enable headphone driver

sudo i2cset -y 1 0x60 1 192 # enable HP outputs
sudo i2cset -y 1 0x60 2 32 # unmute, set vol to -10db
#echo "in" > /sys/class/gpio/gpio28/direction

echo "both" > /sys/class/gpio/gpio28/edge

echo "in" > /sys/class/gpio/gpio29/direction
Expand All @@ -39,27 +56,4 @@ echo "both" > /sys/class/gpio/gpio37/edge
echo "in" > /sys/class/gpio/gpio39/direction
echo "both" > /sys/class/gpio/gpio39/edge


# init framebuffer

sudo modprobe fbtft_device custom name=fb_ssd1322 width=128 height=64 speed=16000000 gpios=dc:7,reset:6


# turn analog gain stages to unity

sudo i2cset -y 1 0x28 0
sudo i2cset -y 1 0x28 64
sudo i2cset -y 1 0x29 0
sudo i2cset -y 1 0x29 64


# unmute soundcard output

amixer set Master on


# enable headphone driver

sudo i2cset -y 1 0x60 1 192 # enable HP outputs
sudo i2cset -y 1 0x60 2 32 # unmute, set vol to -10db
#sudo i2cset -y 1 0x60 2 52 # unmute, set vol to 0.1db
sudo i2cset -y 1 0x60 2 52 # unmute, set vol to 0.1db

0 comments on commit ddcfa3f

Please sign in to comment.