예제 #1
0
        unsafe public static int WriteTRXEEPROMUshort(uint offset, ushort buf)
        {
            byte[] temp = BitConverter.GetBytes(buf);

            fixed(byte *ptr = &temp[0])
            return(USBHIDAPI.WriteEEPROM((ushort)offset, 2, ptr));
        }
예제 #2
0
        unsafe public static int WriteTRXEEPROMFloat(uint offset, float val)
        {
            byte[] temp = BitConverter.GetBytes(val);

            fixed(byte *ptr = &temp[0])
            return(USBHIDAPI.WriteEEPROM((ushort)offset, 4, ptr));
        }
예제 #3
0
 unsafe public static int WriteEEPROM(ushort addr, byte num_bytes, byte[] buf)
 {
     fixed(byte *ptr = &buf[0])
     return(USBHIDAPI.WriteEEPROM(addr, (byte)num_bytes, ptr));
 }
예제 #4
0
 unsafe public static int WriteEEPROM(ushort addr, byte[] buf) // up to 32 bytes
 {
     fixed(byte *ptr = &buf[0])
     return(USBHIDAPI.WriteEEPROM(addr, (byte)buf.Length, ptr));
 }
예제 #5
0
 unsafe public static int WriteTRXEEPROMByte(uint offset, byte buf)
 {
     return(USBHIDAPI.WriteEEPROM((ushort)offset, 1, &buf));
 }