分类 默认分类 下的文章

USB和串口那点儿破事儿

根据百度百科1995年出现USB口
1996年定义USB1.0(Low-speed),传输速率1.5Mbps(0.1875MB/s),少见
1998年定义USB1.1(Full-speed),传输速率12Mbps(1.5MB/s),常见
2000年定义USB2.0(High-speed),传输速率480Mbps(60MB/s实际30?),常见,提供0.5A电源
200x年出现USB3.x,传输速率5Gbps(500MB/s采用10bit),提供1A电源

USB线序和颜色:红白绿黑,对应V、D-、D+、G

Neo2的H5有4个USB口
usb0-microusb,系统编号usb 2
usb1-插针,系统编号usb 6
usb2-插针,系统编号usb 4
usb3-TypeA,系统编号usb 8

串口也有四个ttyS0-3
uart0-debug口
uart1-串口1
uart2-串口2
uart3-没有引出

C#与ZIP

SharpZipLib是一个很不错的C#库,它能够解压缩zip、gzip和tar格式的文件
SharpCompress框架的开源代码,它支持:rar 7zip, zip, tar, tzip和bzip2格式的压缩和解压
https://www.cnblogs.com/zxhome/p/11135552.html
有坑
https://blog.csdn.net/XiaoY_H/article/details/93379007

参考类:
https://blog.csdn.net/hwt0101/article/details/80257610

https://blog.csdn.net/y1535623813/article/details/88976332

关于I2C,,,

查看设备:sudo i2cdetect 0
git clone https://github.com/bpiq/MikuPi.git
cd MikuPi
make
问题:gcc: error trying to exec 'cc1plus': execvp: No such file or directory
sudo apt-get install g++
make
问题:error: cast from ‘volatile long int*’ to ‘unsigned int’ loses precision [-fpermissive]
vi makefile
CFLAGS := -fPIC -fpermissive
make
sudo make install
cd examples/
make clean
make
./blink
问题:Your Pi has an unknown model type. Please report this to
i@mikuq.com
-> with a copy of your /proc/cpuinfo if possible
-> You may want to check:
-> http://MikuQ.com
sudo i2cdetect -y -a 0

https://www.amobbs.com/thread-5557119-1-1.html?_dsign=9e24cd06

全职电灯G11

http://wiki.friendlyarm.com/wiki/index.php/WiringNP:_NanoPi_NEO/NEO2/Air_GPIO_Programming_with_C/zh
https://github.com/friendlyarm/WiringNP

https://www.cnblogs.com/ZQQH/p/8547822.html
Segmentation fault是H3和H5位数的差别?

  addr=0x01C208E8;
  mmap_base = (addr & ~MAP_MASK);
  mmap_seek = ((addr - mmap_base) >> 2);
  while(1)
  {
    val = *(gpio + mmap_seek);
    val &= ~(1<<11);
    *(gpio + mmap_seek) = val;
    delay(500);
    val |= (1<<11);
    *(gpio + mmap_seek) = val;
    delay(500);
  }