Thank you so much Tsuneo, i really appreciate your support.
a)
I can only find the declaration of extern const uint8_t HID_ReportDescriptor[];
in 1343 and not the initialization.
In 1347, the initialization remains the same as in "lpcopen_2_05_keil_iar_nxp_lpcxpresso_1347.zip(hid_desc.c)".
In Both: pipe information, Device, configuration, interface, HID, Endpoint descriptor are similar.
monitored with "Advanced USB Port Monitor"
b)
I only redesigned the front panel to what i wanted and did not temper with these parts of Jan's VB code, they still remain the same.
Array.Resize(inputReportBuffer, MyHid.Capabilities.InputReportByteLength)
Array.Resize(outputReportBuffer, MyHid.Capabilities.OutputReportByteLength)
I just added these part and all other things remain same:
' '' <summary>
' '' Retrieves Input report data and status information.
' '' This routine is called automatically when myInputReport.Read
' '' returns. Calls several marshaling routines to access the main form.
' '' </summary>
' ''
' '' <param name="ar"> an object containing status information about
' '' the asynchronous operation. </param>
''' input from microcontroller
Private Sub GetInputReportData(ByVal ar As IAsyncResult)
Dim AdcValueHigh As Int16
Dim AdcValueLow As Int16
Dim AdcResult As Int16
Dim Adc_str As String
Dim switch_value As Int16
Dim inputReportBuffer As Byte() = Nothing
Try
inputReportBuffer = CType(ar.AsyncState, Byte())
fileStreamdevicedata.EndRead(ar)
tmrReadTimeout.Stop()
' Display the received report data in the form's list box.
If (ar.IsCompleted) Then
'MyMarshalToForm("AddItemToListBox", "An Input report has been read.")
'MyMarshalToForm("AddItemToListBox", " Input Report ID: " & String.Format("{0:X2} ", inputReportBuffer(0)))
'MyMarshalToForm("AddItemToListBox", " Input Report Data:")
switch_value = inputReportBuffer(1)
AdcValueLow = inputReportBuffer(2)
AdcValueHigh = inputReportBuffer(3)
AdcResult = (AdcValueHigh << 8) Or AdcValueLow
AdcResult = CShort(AdcResult * 3300 / 1023)
Adc_str = String.Format("{0:D} ", AdcResult)
MyMarshalToForm("ShowInCounterBox", Adc_str)
If (switch_value And 1) = 1 Then
Button1.BackColor = Color.DarkGreen
Else
Button1.BackColor = Color.Silver
End If
If (switch_value And 2) = 2 Then
Button2.BackColor = Color.DarkGreen
Else
Button2.BackColor = Color.Silver
End If
If (switch_value And 4) = 4 Then
Button3.BackColor = Color.DarkGreen
Else
Button3.BackColor = Color.Silver
End If
Else
Debug.Write("The attempt to read an Input report has failed")
End If
MyMarshalToForm("'ScrollToBottomOfListBox", "")
transferInProgress = False
Catch ex As Exception
DisplayException(Me.Name, ex)
Throw
End Try
End Sub
and this part for lighting LEDs on the board:
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
LedStatusUpdate()
End Sub
Private Sub LedStatusUpdate()
If CheckBox1.Checked = True Then
Output_Status = CByte(Output_Status Or (1 <<0))
CheckBox1.BackColor = Color.DarkGreen
Else
Output_Status = CByte(Output_Status And Not (1 << 0))
CheckBox1.BackColor = Color.Transparent
End If
End Sub
This happens in VB
I placed checkboxes in VB to light LEDs on my board when selected, and buttons that should be changed to green in VB when selected from the board.
If i select the check-boxes in VB, they end up setting the buttons on the same VB interface panel to green instead of lighting the LEDs on the board and pressing buttons on the board does nothing