MDK-ARM Keil, MDK-ARM Datasheet - Page 85

KIT REALVIEW MCU DEVELOPMENT

MDK-ARM

Manufacturer Part Number
MDK-ARM
Description
KIT REALVIEW MCU DEVELOPMENT
Manufacturer
Keil
Type
Compiler and IDEr
Datasheets

Specifications of MDK-ARM

For Use With/related Products
ARM MCUs
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Getting Started: Building Applications with RL-ARM
<HTML>
<BODY>
</BODY>
</HTML>
When this page is viewed, it creates a cell
“textbox1” and a submit-button “change” that
invokes the POST method. Pressing the button will post the data of “textbox1”
to the CGI interface. This causes RL-TCPnet to call the CGI_process_data()
function in the
void cgi_process_data (U8 *dat, U16 len)
}
The two functions CGI_process_data() and CGI_process_var() are used to
handle the GET and POST methods for sending data to a web server. We must
customize the CGI_process_data() function in order to take data from the
textbox1 cell.
When the SUBMIT button is pressed, RL-TCPnet calls CGI_process_data(). In
this function, a buffer called var is allocated. The process data is then copied
into this buffer as a string, by calling the http_get_var() function. This string
contains the name of the form cell and any data that has been entered. The form
of this string is shown below.
textbox1=<input text>
<HEAD>
<TITLE>Post example</TITLE>
</HEAD>
<FORM ACTION="index.cgi" METHOD="POST" NAME="CGI">
</FORM>
unsigned char text1 [16];
var = (U8 *) alloc_mem (40);
do
}
</TABLE>
<TABLE>
dat = http_get_var (dat, var, 40);
if (var [0] != 0 )
}
<TR>
</TR>
{
if (str_scomp (var, "textbox1") == __TRUE)
}
<TD>
<TD ALIGN="right">
str_copy (text1, var+4);
process_Input (text1);
<INPUT TYPE="TEXT" ID="textbox1" SIZE="16" VALUE=""></TD>
<INPUT TYPE="SUBMIT" ID="change" VALUE="change"></TD>
HTTP_CGI.c
{
file.
// extract user data
// user function to process data
{
{
85

Related parts for MDK-ARM