혹시나 해서 jsm583 칩으로 만들어진 리뷰안 m.2 to USB3.0을 이용해서 사용이 가능한가 했는데 역시나(?) 안되는 듯.
usb 자체가 pcie bridge로 작동하는게 아니라 usb storage class로 잡혀 버리는 듯.
[338494.964509] usb 2-3: new SuperSpeed USB device number 4 using xhci_hcd [338494.977488] usb 2-3: New USB device found, idVendor=152d, idProduct=0583, bcdDevice= 2.13 [338494.977506] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [338494.977513] usb 2-3: Product: RevuAhn UX981 [338494.977519] usb 2-3: Manufacturer: RevuAhn [338494.977524] usb 2-3: SerialNumber: DD56419883F0D [338495.034745] usbcore: registered new interface driver usb-storage [338495.041007] scsi host0: uas [338495.041138] usbcore: registered new interface driver uas [338495.041650] scsi 0:0:0:0: Direct-Access RevuAhn UX981 0213 PQ: 0 ANSI: 6 [338495.043619] sd 0:0:0:0: Attached scsi generic sg0 type 0 [338504.393782] sd 0:0:0:0: [sda] Unit Not Ready [338504.393801] sd 0:0:0:0: [sda] Sense Key : Hardware Error [current] [338504.393815] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 [338504.520396] sd 0:0:0:0: [sda] Read Capacity(16) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK [338504.520415] sd 0:0:0:0: [sda] Sense Key : Hardware Error [current] [338504.520427] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 [338504.646381] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK [338504.646398] sd 0:0:0:0: [sda] Sense Key : Hardware Error [current] [338504.646411] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 [338504.690523] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B) [338504.690528] sd 0:0:0:0: [sda] 0-byte physical blocks [338504.812434] sd 0:0:0:0: [sda] Test WP failed, assume Write Enabled [338504.857011] sd 0:0:0:0: [sda] Asking for cache data failed [338504.857031] sd 0:0:0:0: [sda] Assuming drive cache: write through [338504.857041] sd 0:0:0:0: [sda] Preferred minimum I/O size 4096 bytes not a multiple of physical block size (0 bytes) [338504.857049] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (0 bytes) [338504.857933] sd 0:0:0:0: [sda] Attached SCSI disk
PCIe Bridge는 맞지.. storage solution 이라 그렇지...(!!)
JMicron announced its JMS583 (USB 3.1 to PCIe Bridge controller) received USB-IF Logo Certification
The JMS583 is mainly used in the development of PCIe/NVMe related products, such as converting a PCIe/NVMe SSD to a superspeed plus USB interface portable mobile storage solution.
This will significantly reduce the cost and time needed for PCIe/NVMe SSD production in the factory, which will also accelerate the end-product’s time-to-market. JMicron believes that the market will always strive for extreme high-speed, low power consumption, thin and light solutions for external storage products.
Complies with PCI Express Base Specification Revision 3.1a ◼ Complies with NVM Express 1.3 ◼ Complies with USB 3.1 Gen 1 and Gen 2 Specification, USB Mass Storage Class, Bulk-Only Transport Specification (Revision 1.0) ◼ Complies with USB Attached SCSI Protocol (UASP) Specification (Revision 4)
Summary OpenVINO™ version that supports MYRIAD device.
Description Unable to determine whether MYRIAD device is supported on OpenVINO™ 2022.3.0.
Resolution Intel® Movidius ™ VPU based products (MYRIAD device) are not supported in OpenVINO™ 2022.3.0 release but will be added back in a future OpenVINO™ 2022.3.1 LTS update.
상자는 세로, 가로로 쓸 문자만 넣어주면 되는 듯. 터미널 사이즈에 따른 동적 변화는 따로 찾아봐야겠네.
#include <ncurses.h>
int main(void){ initscr(); start_color(); init_color(1, 0, 1000, 0); // 1번 색상(글자색): 초록색 init_color(2, 0, 0, 1000); // 2번 색상(배경색): 파랑색 init_pair(1, 1, 2); // 1번 Color pair를 초록 글자색과 파랑 배경색으로 지정
WINDOW * win = newwin(20, 20, 10, 10); box(win, '|', '-'); waddch(win, 'A' | COLOR_PAIR(1)); // 1번 Color pair를 적용해 문자 출력
refresh(); wrefresh(win); getch(); endwin(); }
start_color() 로 색상을 사용할 수 있도록 설정하고
init_color(index, , , ,)로 팔레트를 초기화 하고
attron(attribute on), attroff(attribute off) 함수로 색상을 적용/해제 한다.
int timer(){ int row = 10, col = 10; initscr(); noecho(); // 입력을 자동으로 화면에 출력하지 않도록 합니다. curs_set(FALSE); // cursor를 보이지 않게 합니다.
keypad(stdscr, TRUE); while(1){ int input = getch(); clear(); switch(input){ case KEY_UP: mvprintw(--row, col, "A"); // real moving in your screen continue; case KEY_DOWN: mvprintw(++row, col, "A"); continue; case KEY_LEFT: mvprintw(row, --col, "A"); continue; case KEY_RIGHT: mvprintw(row, ++col, "A"); continue;