차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| cfnet:cfheaderprogramming:code_3 [2026/02/14 03:20] – created admin | cfnet:cfheaderprogramming:code_3 [알 수 없는 날짜] (현재) – 제거됨 - 바깥 편집 (알 수 없는 날짜) 127.0.0.1 | ||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| - | <code csharp> | + | |
| - | // Get the CFHEADER module at address 0 | + | |
| - | var cfheader0 = Cfheader.Instances[0]; | + | |
| - | + | ||
| - | // Try to open USB communication with the CFHEADER module. | + | |
| - | try | + | |
| - | { | + | |
| - | cfheader0.Open(); | + | |
| - | } | + | |
| - | catch(Exception ex) | + | |
| - | { | + | |
| - | Console.Error.WriteLine($" | + | |
| - | Environment.Exit(1); | + | |
| - | } | + | |
| - | + | ||
| - | // Try communicating over USB with the CFHEADER module | + | |
| - | try | + | |
| - | { | + | |
| - | while(true) | + | |
| - | { | + | |
| - | cfheader0.Sync(); | + | |
| - | } | + | |
| - | } | + | |
| - | catch(Exception ex) | + | |
| - | { | + | |
| - | Console.Error.WriteLine($" | + | |
| - | Environment.Exit(1); | + | |
| - | } | + | |
| - | + | ||
| - | // Close USB communication with the CFHEADER module. | + | |
| - | cfheader0.Close(); | + | |
| - | </ | + | |
