diff --git a/config/config.txt b/config/config.txt new file mode 100755 index 0000000..7b88ecd --- /dev/null +++ b/config/config.txt @@ -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 diff --git a/config/rc.local b/config/rc.local new file mode 100755 index 0000000..8e74280 --- /dev/null +++ b/config/rc.local @@ -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 diff --git a/image.txt b/image.txt index dd4e2de..0380444 100644 --- a/image.txt +++ b/image.txt @@ -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 + + + diff --git a/scripts/init-norns.sh b/scripts/init-norns.sh index 3136cdf..3fab7ad 100755 --- a/scripts/init-norns.sh +++ b/scripts/init-norns.sh @@ -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 @@ -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