Search found 2187 matches

by majenko
Tue Dec 26, 2017 10:09 pm
Forum: Tips, Tricks & Hints
Topic: [solved] Can we polling USB CDC for DTR / RTS LineState?
Replies: 7
Views: 166

Re: [solved] Can we polling USB CDC for DTR / RTS LineState?

One thing you really need to be aware of is that the USB core uses the line state internally to know if the port is opened. If DTR and RTS are both 0 then it won't ever send anything out:

Code: Select all

size_t CDCACM::write(uint8_t b) {

    if (_lineState == 0) return 0;
by majenko
Sun Dec 24, 2017 2:36 pm
Forum: Tips, Tricks & Hints
Topic: [solved] Can we polling USB CDC for DTR / RTS LineState?
Replies: 7
Views: 166

Re: Can we polling USB CDC for DTR / RTS LineState?

It can be added in USB.h in the CDCACM class as one line: int getLineState() { return _lineState; } I guess it could be further divided down for convenience: bool getDTR() { return ((_lineState & 0x01) == 0x01); } bool getRTS() { return ((_lineState & 0x02) == 0x02); } Since we've just done the merg...
by majenko
Sat Dec 23, 2017 2:47 pm
Forum: Tips, Tricks & Hints
Topic: [solved] Can we polling USB CDC for DTR / RTS LineState?
Replies: 7
Views: 166

Re: Can we polling USB CDC for DTR / RTS LineState?

You can't filter the two signals out, no. It's only an "if either are set" signal.

The internal code is simply:

Code: Select all

CDCACM::operator int() {
    return _lineState > 0;
}
I guess code could be added to get the line state, but it would be non-standard (i.e., not in the Arduino specification).
by majenko
Thu Dec 21, 2017 12:58 pm
Forum: Tips, Tricks & Hints
Topic: [solved] Can we polling USB CDC for DTR / RTS LineState?
Replies: 7
Views: 166

Re: Can we polling USB CDC for DTR / RTS LineState?

There is no specific function for getting the DTR, but the `int` operator of the Serial classes is designed to return the status of the port, which is gleaned from either of the two lowest bits of the line coding being 1 (that is equivalent to DTR and RTS). This is standard Arduino functionality: ht...
by majenko
Fri Dec 15, 2017 2:39 pm
Forum: General Discussion
Topic: Use Rfid RC522 library at Chipkit uno 32?
Replies: 7
Views: 122

Re: Use Rfid RC522 library at Chipkit uno 32?

That is only a warning, though. The library doesn't know it's compatible with PIC32 - it's just a setting in the library.properties file. It should really be set to work with any architecture since it doesn't do anything at all that is architecture dependant. Have you had other sketches working on y...
by majenko
Fri Dec 15, 2017 12:49 pm
Forum: General Discussion
Topic: Use Rfid RC522 library at Chipkit uno 32?
Replies: 7
Views: 122

Re: Use Rfid RC522 library at Chipkit uno 32?

Are you sure you have it set to the right board? The STM32F1 is an ARM chip, not a PIC32...
by majenko
Tue Dec 12, 2017 8:51 pm
Forum: General Discussion
Topic: Use Rfid RC522 library at Chipkit uno 32?
Replies: 7
Views: 122

Re: Use Rfid RC522 library at Chipkit uno 32?

I would suggest trying it with the Arduino IDE, certainly. That way we can rule out if it's something the PlatformIO is doing wrong.
by majenko
Tue Dec 12, 2017 4:36 pm
Forum: General Discussion
Topic: Use Rfid RC522 library at Chipkit uno 32?
Replies: 7
Views: 122

Re: Use Rfid RC522 library at Chipkit uno 32?

What code are you using? What version of the chipKIT Core, Arduino IDE, etc are you using?
by majenko
Sun Dec 10, 2017 7:41 pm
Forum: General Discussion
Topic: UECIDE's window is garbled.
Replies: 5
Views: 88

Re: UECIDE's window is garbled.

Or it could be something else installed on your computer that's interfering with things. Maybe some malware.
by majenko
Sat Dec 09, 2017 12:16 pm
Forum: General Discussion
Topic: UECIDE's window is garbled.
Replies: 5
Views: 88

Re: UECIDE's window is garbled.

That kind of mess most often happens when Java has crashed. Make sure you are on the latest Java version and UECIDE version. The failure to delete issue is a known problem that I am working on. Windows has a hard time deleting files if they happen to be locked, and Java doesn't like releasing locks ...