USB charging sepecs

 

  1. Standard downstream port (SDP) This is the same port defined by the USB 2.0 spec and is the typical form found in desktop and laptop computers. The maximum load current is 2.5mA when suspended, 100mA when connected and not suspended, and 500mA (max) when configured for that current. A device can recognize a SDP with hardware by detecting that the USB data lines, D+ and D-, are separately grounded through 15kΩ, but it still needs to enumerate to be USB compliant. In USB 2.0, it is not strictly legal to draw power without enumerating, although much of present-day hardware does just that, and in violation of the spec.
  2. Charging downstream port (CDP) BC1.1 defines this new, higher current USB port for PCs, laptops, and other hardware. Now the CDP can supply up to 1.5A, which is a departure from USB 2.0 because this current can be supplied before enumeration. A device plugged into a CDP can recognize it as such by means of a hardware handshake implemented by manipulating and monitoring the D+ and D- lines. (See USB Battery Charging Specification, section 3.2.3.) The hardware test takes place before turning the data lines over to the USB transceiver, thus allowing a CDP to be detected (and charging to begin) before enumeration.
  3. Dedicated charging port (DCP) BC1.1 describes power sources like wall warts and auto adapters that do not enumerate so that charging can occur with no digital communication at all. DCPs can supply up to 1.5A and are identified by a short between D+ to D-. This allows the creation of DCP “wall warts” that feature a USB mini or micro receptacle instead of a permanently attached wire with a barrel or customized connector. Such adapters allow any USB cable (with the correct plugs) to be used for charging.

 

http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf

 

https://www.maximintegrated.com/en/app-notes/index.mvp/id/4803

stm8s103f3 communication with ssd1306 by using I2C

이거 별거 아닌데 ….
STM8S103F에서 I2C 드라이버 만들고
아두이노 라이브러리 보면서 SSD1306 컨트롤러 만들고
SSD1306 동작방법 이해하다 보니까 이거 하는데 꼬박 하루 쏟아부었다…
스크롤 기능도 있는거 같던데 필요하게되면 해봐야지

저거 이미지만 1k인데 stm8s103f 스펙이 4k… 보통 코드가 적당히 쓰면 2k정도 나오는데 이미지 두개 구겨넣으면 겨우 들어갈듯…

http://en.radzio.dxp.pl/bitmap_converter/
https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf
http://www.rinkydinkelectronics.com/r_fonts.php

근데 뭐하려고 만들었더라?!@….

20161205_000923

Vmware 12.5.0 on debian 8.6

최근 커널을 4.8.11로 바꾸고 vmware를 사용하려니 gcc 6.2.1버전이상을 찾는다…
아시다시피 Debian은 패키지 업데이트에 굉장히 보수적이어서 gcc 6.x버전은 아직 dev라인에 있다.

https://packages.debian.org/sid/amd64/gcc-6/download

뭐 대충 sid에서 패키지 받아서 /tmp에 풀었는데 별문제 없이 실행된다.
vmware modconfig도 path만 잡아주니 별 문제없이 슝슝 잘됨.

Stopping VMware services:
   VMware Authentication Daemon                                        done
   VM communication interface socket family                            done
   Virtual machine communication interface                             done
   Virtual machine monitor                                             done
   Blocking file system                                                done
modprobe: FATAL: Module vmnet not found.
make: Entering directory '/tmp/modconfig-QudNpU/vmmon-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/4.8.11/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-4.8.11'
  CC [M]  /tmp/modconfig-QudNpU/vmmon-only/linux/driver.o
  CC [M]  /tmp/modconfig-QudNpU/vmmon-only/linux/hostif.o
  CC [M]  /tmp/modconfig-QudNpU/vmmon-only/common/apic.o
  CC [M]  /tmp/modconfig-QudNpU/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/modconfig-QudNpU/vmmon-only/common/memtrack.o
  CC [M]  /tmp/modconfig-QudNpU/vmmon-only/common/hashFunc.o
  CC [M]  /tmp/modconfig-QudNpU/vmmon-only/common/vmx86.o
  CC [M]  /tmp/modconfig-QudNpU/vmmon-only/common/cpuid.o
/tmp/modconfig-QudNpU/vmmon-only/linux/driver.c:1283:1: warning: always_inline function might not be inlinable [-Wattributes]
 LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
 ^
  CC [M]  /tmp/modconfig-QudNpU/vmmon-only/common/task.o
  CC [M]  /tmp/modconfig-QudNpU/vmmon-only/common/comport.o
  CC [M]  /tmp/modconfig-QudNpU/vmmon-only/common/phystrack.o
  CC [M]  /tmp/modconfig-QudNpU/vmmon-only/vmcore/moduleloop.o
  LD [M]  /tmp/modconfig-QudNpU/vmmon-only/vmmon.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/modconfig-QudNpU/vmmon-only/vmmon.mod.o
  LD [M]  /tmp/modconfig-QudNpU/vmmon-only/vmmon.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.8.11'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/modconfig-QudNpU/vmmon-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/modconfig-QudNpU/vmmon-only'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory '/tmp/modconfig-QudNpU/vmmon-only'
make: Entering directory '/tmp/modconfig-QudNpU/vmnet-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/4.8.11/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-4.8.11'
  CC [M]  /tmp/modconfig-QudNpU/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-QudNpU/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-QudNpU/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-QudNpU/vmnet-only/netif.o
In file included from ./include/linux/pci.h:35:0,
                 from /tmp/modconfig-QudNpU/vmnet-only/compat_netdevice.h:27,
                 from /tmp/modconfig-QudNpU/vmnet-only/netif.c:43:
./include/linux/pci_ids.h:2253:0: warning: "PCI_VENDOR_ID_VMWARE" redefined
 #define PCI_VENDOR_ID_VMWARE  0x15ad
 ^
In file included from /tmp/modconfig-QudNpU/vmnet-only/net.h:38:0,
                 from /tmp/modconfig-QudNpU/vmnet-only/vnetInt.h:26,
                 from /tmp/modconfig-QudNpU/vmnet-only/netif.c:42:
/tmp/modconfig-QudNpU/vmnet-only/vm_device_version.h:56:0: note: this is the location of the previous definition
 #define PCI_VENDOR_ID_VMWARE                    0x15AD
 ^
  CC [M]  /tmp/modconfig-QudNpU/vmnet-only/bridge.o
  CC [M]  /tmp/modconfig-QudNpU/vmnet-only/procfs.o
  CC [M]  /tmp/modconfig-QudNpU/vmnet-only/smac_compat.o
  CC [M]  /tmp/modconfig-QudNpU/vmnet-only/smac.o
  CC [M]  /tmp/modconfig-QudNpU/vmnet-only/vnetEvent.o
  CC [M]  /tmp/modconfig-QudNpU/vmnet-only/vnetUserListener.o
In file included from /tmp/modconfig-QudNpU/vmnet-only/net.h:38:0,
                 from /tmp/modconfig-QudNpU/vmnet-only/vnetInt.h:26,
                 from /tmp/modconfig-QudNpU/vmnet-only/bridge.c:52:
/tmp/modconfig-QudNpU/vmnet-only/vm_device_version.h:56:0: warning: "PCI_VENDOR_ID_VMWARE" redefined
 #define PCI_VENDOR_ID_VMWARE                    0x15AD
 ^
In file included from ./include/linux/pci.h:35:0,
                 from /tmp/modconfig-QudNpU/vmnet-only/compat_netdevice.h:27,
                 from /tmp/modconfig-QudNpU/vmnet-only/bridge.c:51:
./include/linux/pci_ids.h:2253:0: note: this is the location of the previous definition
 #define PCI_VENDOR_ID_VMWARE  0x15ad
 ^
  LD [M]  /tmp/modconfig-QudNpU/vmnet-only/vmnet.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/modconfig-QudNpU/vmnet-only/vmnet.mod.o
  LD [M]  /tmp/modconfig-QudNpU/vmnet-only/vmnet.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.8.11'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/modconfig-QudNpU/vmnet-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/modconfig-QudNpU/vmnet-only'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory '/tmp/modconfig-QudNpU/vmnet-only'
Starting VMware services:
   Virtual machine monitor                                             done
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Blocking file system                                                done
   Virtual ethernet                                                    done
   VMware Authentication Daemon                                        done
   Shared Memory Available                                             done

별문제 없다. 구글링해보니 명쾌한 해결책이 안나와있어서 포기할까 하다가 해봤는데 쉽게 풀려서 다행이다.