Subject:
|
Re: Using NXT Port 4 EIA-485
|
Newsgroups:
|
lugnet.robotics.nxt
|
Date:
|
Tue, 10 Apr 2007 16:15:33 GMT
|
Viewed:
|
15406 times
|
| |
![Post a public reply to this message](/news/icon-reply.gif) | |
In lugnet.robotics.nxt, John Barnes wrote:
> Do you know how large the OutBuf and InBuf are?
They are tiny.
#define SIZE_OF_HSBUF 128
typedef struct
{
UBYTE Buf[SIZE_OF_HSBUF];
UBYTE InPtr;
UBYTE OutPtr;
UBYTE Spare1;
UBYTE Spare2;
}HSBUF;
// HI Speed related entries
HSBUF HsInBuf;
HSBUF HsOutBuf;
The IOMap hi speed buffer is copied into the VarsComm structure's high speed
buffer like this:
void cCommSendHiSpeedData(void)
{
VarsComm.HsModuleOutBuf.OutPtr = 0;
for (VarsComm.HsModuleOutBuf.InPtr = 0; VarsComm.HsModuleOutBuf.InPtr <
IOMapComm.HsOutBuf.InPtr; VarsComm.HsModuleOutBuf.InPtr++)
{
VarsComm.HsModuleOutBuf.Buf[VarsComm.HsModuleOutBuf.InPtr] =
IOMapComm.HsOutBuf.Buf[IOMapComm.HsOutBuf.OutPtr];
IOMapComm.HsOutBuf.OutPtr++;
}
dHiSpeedSendData(VarsComm.HsModuleOutBuf.Buf, (VarsComm.HsModuleOutBuf.InPtr -
VarsComm.HsModuleOutBuf.OutPtr));
}
The HsModuleOutBuf.Buf is 256 bytes but there isn't any way exposed in the
standard NXT firmware to directly access this buffer. Also, the standard NXT
firmware limits the number of bytes that can be read or written using the
IOMapRead and IOMapWrite syscall functions to 64 bytes per call. Using my
enhanced version of the standard NXT firmware you can read and write up to 800
bytes per call and you can avoid the module search overhead by using the
IOMapReadByID and IOMapWriteByID syscall functions.
John Hansen
|
|
Message is in Reply To:
![](/news/x.gif) | | Re: Using NXT Port 4 EIA-485
|
| (...) Hi John. I must have misunderstood something I was told a while back which went along the lines of "there isn't enough time to implement support for this feature". Perhaps there was some time after all ;) Do you know how large the OutBuf and (...) (17 years ago, 9-Apr-07, to lugnet.robotics.nxt)
|
15 Messages in This Thread: ![Using NXT Port 4 EIA-485 -Christian Mock (7-Apr-07 to lugnet.robotics.nxt)](/news/x.gif) ![](/news/246.gif) ![Re: Using NXT Port 4 EIA-485 -John Barnes (8-Apr-07 to lugnet.robotics.nxt)](/news/x.gif) ![](/news/246.gif) ![RE: Using NXT Port 4 EIA-485 -"Dick Swan" <dickswan@sbcglobal.net> (8-Apr-07 to lugnet.robotics.nxt, lugnet.robotics.nxt.nxthacking)](/news/x.gif) ![](/news/46.gif) ![Re: Using NXT Port 4 EIA-485 -Christian Mock (9-Apr-07 to lugnet.robotics.nxt, lugnet.robotics.nxt.nxthacking)](/news/x.gif) ![](/news/46.gif) ![Re: Using NXT Port 4 EIA-485 -Juergen Stuber (10-Apr-07 to lugnet.robotics.nxt, lugnet.robotics.nxt.nxthacking)](/news/x.gif) ![](/news/46.gif) ![Re: Using NXT Port 4 EIA-485 -Christian Mock (10-Apr-07 to lugnet.robotics.nxt, lugnet.robotics.nxt.nxthacking)](/news/x.gif) ![](/news/46.gif) ![Re: Using NXT Port 4 EIA-485 -Sivan Toledo (25-May-07 to lugnet.robotics.nxt, lugnet.robotics.nxt.nxthacking)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Using NXT Port 4 EIA-485 -John Hansen (9-Apr-07 to lugnet.robotics.nxt)](/news/x.gif) ![](/news/246.gif) ![Re: Using NXT Port 4 EIA-485 -Christian Mock (9-Apr-07 to lugnet.robotics.nxt)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Using NXT Port 4 EIA-485 -John Barnes (9-Apr-07 to lugnet.robotics.nxt)](/news/x.gif) ![](/news/46.gif) ![You are here](/news/here.gif)
![](/news/x.gif) ![](/news/68.gif) ![Re: Using NXT Port 4 EIA-485 -Ralph Hempel (16-Apr-07 to lugnet.robotics.nxt)](/news/x.gif) ![](/news/46.gif) ![Re: Using NXT Port 4 EIA-485 -Christian Mock (17-Apr-07 to lugnet.robotics.nxt)](/news/x.gif) ![](/news/46.gif) ![Re: Using NXT Port 4 EIA-485 -Ralph Hempel (17-Apr-07 to lugnet.robotics.nxt)](/news/x.gif) ![](/news/46.gif) ![Re: Using NXT Port 4 EIA-485 -Christian Mock (17-Apr-07 to lugnet.robotics.nxt)](/news/x.gif)
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|