You can see the github repository at http://github.com/netburner
At this point, this is more of a preview for you, the forum community. Over the next few weeks we will be adding more examples, which include rewrites of some of our existing examples. We will also be integrating these examples directly to our releases, so that what you see on github is what will be included in upcoming NNDK releases.
One small note, the examples we have already uploaded include a new function init() and initWithWeb(). These helper functions include the default initialization functions you would normally find in the start of UserMain. You cannot build the examples on github without the new code, which will be released in the next 2.6.3 of the tools. If you really need to build the examples, you can add this init function to your code.
So the init function looks like this:
Code: Select all
#include <startnet.h>
#include <autoupdate.h>
#include <taskmon.h>
#include <dhcpclient.h>
#include <NetworkDebug.h>
#include <serial.h>
void init()
{
SerialClose( 0 ); // Switch to IRQ serial I/O mode
int fdSerial = OpenSerial( 0, 115200, 1, 8, eParityNone );
ReplaceStdio( 0, fdSerial ); // stdin via UART 0
ReplaceStdio( 1, fdSerial ); // stdout via UART 0
ReplaceStdio( 2, fdSerial ); // stderr via UART 0
InitializeStack(); // Initialize TCP/IP
GetDHCPAddressIfNecessary(); // Set up networking, print IP address
OSChangePrio( MAIN_PRIO ); // Set up this threads priority
EnableAutoUpdate(); // Enable Autoupdate support
EnableTaskMonitor(); // Enable Task Monitor support
#ifdef _DEBUG // Set up network debugging
InitializeNetworkGDB();
#endif
}