2 次代碼提交 803d848ce6 ... ffd7e8966a

作者 SHA1 備註 提交日期
  yoneda ffd7e8966a new: raspbian 2019-04-08 5 年之前
  yoneda 9c00e75fcb modified: raspbian 2019-04-08 5 年之前
共有 5 個文件被更改,包括 5 次插入3 次删除
  1. 1 1
      tree/boot/config.txt
  2. 0 0
      tree/media/extSD/mount_point
  3. 0 0
      tree/media/music/music_directory
  4. 1 0
      tree/media/usb
  5. 3 2
      tree/usr/local/bin/mmc2.py

+ 1 - 1
tree/boot/config.txt

@@ -59,7 +59,7 @@ dtparam=spi=on
 dtoverlay=hifiberry-dacplus,24db_digital_gain
 
 # Ir
-dtoverlay=lirc-rpi:gpio_in_pin=4,gpio_in_pull=down
+dtoverlay=gpio-ir,gpio_pin=4
 
 # Secondary SDCard
 dtoverlay=mmc_spi_cs1

tree/extSD/mount_point → tree/media/extSD/mount_point


tree/home/mpd/music/music_directory → tree/media/music/music_directory


+ 1 - 0
tree/media/usb

@@ -0,0 +1 @@
+usb0

+ 3 - 2
tree/usr/local/bin/mmc2.py

@@ -8,6 +8,7 @@ import signal
 MMC2DEV=['/dev/mmcblk1p1', '/dev/mmcblk2p1', '/dev/mmcblk3p1', '/dev/mmcblk4p1']
 MMC2DEBUG='/sys/kernel/debug/mmc'
 MODPROBE='/sbin/modprobe'
+MOUNTPOINT='/media/extSD'
 
 def mountMMC2():
 	mmc_number=0
@@ -21,7 +22,7 @@ def mountMMC2():
 	if dev is not None:
 		r=None
 		for i in range(10):
-			r=subprocess.run(['/bin/mount', dev, '/extSD','-o','user,ro,umask=000,iocharset=utf8,codepage=932,shortname=mixed'])
+			r=subprocess.run(['/bin/mount', dev, MOUNTPOINT,'-o','user,ro,umask=000,iocharset=utf8,codepage=932,shortname=mixed'])
 			if r.returncode != 0:
 				time.sleep(1)
 			else:
@@ -42,7 +43,7 @@ def mountMMC2():
 		return False
 
 def umountMMC2():
-	os.system('/bin/umount /extSD')
+	os.system('/bin/umount '+MOUNTPOINT)
 	return
 		
 def signal_handler(signal, handler):