Whitespace removal.

This commit is contained in:
Ralf Corsepius
2009-11-30 16:01:51 +00:00
parent 1de949a8bd
commit 05c18861dd
187 changed files with 802 additions and 802 deletions

View File

@@ -38,7 +38,7 @@
*/ */
#if (defined(__GNUC__) && (defined(__arm__) && !defined(__thumb__))) #if (defined(__GNUC__) && (defined(__arm__) && !defined(__thumb__)))
/* This currently does not support Thumb assembly */ /* This currently does not support Thumb assembly */
#include "in_cksum_arm.h" #include "in_cksum_arm.h"

View File

@@ -239,7 +239,7 @@ int
in4_cksum( in4_cksum(
struct mbuf *m, struct mbuf *m,
u_int8_t nxt, u_int8_t nxt,
int off, int off,
int len ) int len )
{ {
u_int sum = 0; u_int sum = 0;
@@ -254,14 +254,14 @@ in4_cksum(
panic("in4_cksum: offset too short"); panic("in4_cksum: offset too short");
if (m->m_len < sizeof(struct ip)) if (m->m_len < sizeof(struct ip))
panic("in4_cksum: bad mbuf chain"); panic("in4_cksum: bad mbuf chain");
bzero(&ipov, sizeof(ipov)); bzero(&ipov, sizeof(ipov));
ipov.ih_len = htons(len); ipov.ih_len = htons(len);
ipov.ih_pr = nxt; ipov.ih_pr = nxt;
ipov.ih_src = mtod(m, struct ip *)->ip_src; ipov.ih_src = mtod(m, struct ip *)->ip_src;
ipov.ih_dst = mtod(m, struct ip *)->ip_dst; ipov.ih_dst = mtod(m, struct ip *)->ip_dst;
w = (u_char *)&ipov; w = (u_char *)&ipov;
/* assumes sizeof(ipov) == 20 */ /* assumes sizeof(ipov) == 20 */
ADD16; ADD16;
ADD4; ADD4;

View File

@@ -29,7 +29,7 @@
/* /*
* $Id$ * $Id$
*/ */
#ifndef _RTEMS_BSDNET__TYPES_H_ #ifndef _RTEMS_BSDNET__TYPES_H_
#define _RTEMS_BSDNET__TYPES_H_ #define _RTEMS_BSDNET__TYPES_H_

View File

@@ -1,7 +1,7 @@
/** /**
* @file rtems/rtems_bsdnet.h * @file rtems/rtems_bsdnet.h
*/ */
/* /*
* $Id$ * $Id$
*/ */

View File

@@ -5,7 +5,7 @@
Copyright Cybertec Pty Ltd, 2005 Copyright Cybertec Pty Ltd, 2005
All rights reserved Cybertec Pty Ltd, 2005 All rights reserved Cybertec Pty Ltd, 2005
This software with is provided ``as is'' and with NO WARRANTY. This software with is provided ``as is'' and with NO WARRANTY.
------------------------------------------------------------------------ ------------------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
/** /**
* @file rtems/rtems_bsdnet.h * @file rtems/rtems_bsdnet.h
*/ */
/* /*
* $Id$ * $Id$
*/ */
@@ -155,7 +155,7 @@ struct rtems_bsdnet_config {
/* /*
* Default "multiplier" on buffer size. This is * Default "multiplier" on buffer size. This is
* claimed by the TCP/IP implementation to be for * claimed by the TCP/IP implementation to be for
* efficiency but you will have to measure the * efficiency but you will have to measure the
* benefit for buffering beyond double buffering * benefit for buffering beyond double buffering
* in your own application. * in your own application.
* *
@@ -168,7 +168,7 @@ struct rtems_bsdnet_config {
* Default UDP buffer sizes PER SOCKET!! * Default UDP buffer sizes PER SOCKET!!
* *
* TX = 9216 -- max datagram size * TX = 9216 -- max datagram size
* RX = 40 * (1024 + sizeof(struct sockaddr_in)) * RX = 40 * (1024 + sizeof(struct sockaddr_in))
* *
* See netinet/udp_usrreq.c for details * See netinet/udp_usrreq.c for details
*/ */
@@ -296,7 +296,7 @@ void rtems_bsdnet_malloc_starvation(void);
/* /*
* mbuf malloc interface to enable custom allocation of mbuf's * mbuf malloc interface to enable custom allocation of mbuf's
* *
* May be declared in user code. If not, then the default is to * May be declared in user code. If not, then the default is to
* malloc. * malloc.
*/ */

View File

@@ -1,5 +1,5 @@
/* /*
* DCHP client for RTEMS * DCHP client for RTEMS
* Andrew Bythell, <abythell@nortelnetworks.com> * Andrew Bythell, <abythell@nortelnetworks.com>
* based on and uses subroutines from c/src/libnetworking/nfs/bootp_subr.c * based on and uses subroutines from c/src/libnetworking/nfs/bootp_subr.c
*/ */
@@ -166,7 +166,7 @@ struct dhcp_packet
unsigned char vend[312]; unsigned char vend[312];
}; };
/* /*
* External Declarations for Functions found in * External Declarations for Functions found in
* rtems/c/src/libnetworking/nfs/ * rtems/c/src/libnetworking/nfs/
*/ */
@@ -236,11 +236,11 @@ printsetup (const char *iface,
char ip_str[15]; char ip_str[15];
printf ("dhcpc: %s: ", iface); printf ("dhcpc: %s: ", iface);
ip = ntohl (ip_addr.s_addr); ip = ntohl (ip_addr.s_addr);
format_ip (ip, ip_str); format_ip (ip, ip_str);
printf ("inet: %-15s ", ip_str); printf ("inet: %-15s ", ip_str);
ip = ntohl (mask_addr.s_addr); ip = ntohl (mask_addr.s_addr);
format_ip (ip, ip_str); format_ip (ip, ip_str);
printf ("mask: %-15s\n", ip_str); printf ("mask: %-15s\n", ip_str);
@@ -248,11 +248,11 @@ printsetup (const char *iface,
ip = ntohl (srv_addr.s_addr); ip = ntohl (srv_addr.s_addr);
format_ip (ip, ip_str); format_ip (ip, ip_str);
printf (" srv: %-15s ", ip_str); printf (" srv: %-15s ", ip_str);
ip = ntohl (gw_addr.s_addr); ip = ntohl (gw_addr.s_addr);
format_ip (ip, ip_str); format_ip (ip, ip_str);
printf (" gw: %-15s\n", ip_str); printf (" gw: %-15s\n", ip_str);
return; return;
} }
@@ -283,13 +283,13 @@ process_options (unsigned char *optbuf, int optbufSize)
} }
len = optbuf[j + 1]; len = optbuf[j + 1];
j += 2; j += 2;
if ((len + j) >= optbufSize) if ((len + j) >= optbufSize)
{ {
printf ("Truncated field for code %d", code); printf ("Truncated field for code %d", code);
return; return;
} }
ncode = optbuf[j + len]; ncode = optbuf[j + len];
optbuf[j + len] = '\0'; optbuf[j + len] = '\0';
p = (char*) &optbuf[j]; p = (char*) &optbuf[j];
@@ -420,7 +420,7 @@ process_options (unsigned char *optbuf, int optbufSize)
/* DHCP Requested IP Address */ /* DHCP Requested IP Address */
if (len != 4) if (len != 4)
printf ("dhcpc: DHCP option requested IP len is %d", len); printf ("dhcpc: DHCP option requested IP len is %d", len);
/* /*
* although nothing happens here, this case keeps the client * although nothing happens here, this case keeps the client
* from complaining about unknown options. The Requested IP * from complaining about unknown options. The Requested IP
* is necessary to return to the server for a DHCP REQUEST * is necessary to return to the server for a DHCP REQUEST
@@ -436,7 +436,7 @@ process_options (unsigned char *optbuf, int optbufSize)
memcpy (&dhcp_lease_time, &p[0], 4); memcpy (&dhcp_lease_time, &p[0], 4);
dhcp_lease_time = ntohl (dhcp_lease_time); dhcp_lease_time = ntohl (dhcp_lease_time);
break; break;
case 52: case 52:
/* DHCP option override */ /* DHCP option override */
if (len != 1) { if (len != 1) {
@@ -455,7 +455,7 @@ process_options (unsigned char *optbuf, int optbufSize)
dhcp_message_type = p[0]; dhcp_message_type = p[0];
break; break;
case 128: /* Site-specific option for DHCP servers that case 128: /* Site-specific option for DHCP servers that
* a) don't supply tag 54 * a) don't supply tag 54
* and * and
* b) don't supply the server address in siaddr * b) don't supply the server address in siaddr
@@ -501,7 +501,7 @@ dhcp_discover_req (struct dhcp_packet* call,
unsigned long *xid) unsigned long *xid)
{ {
int len = 0; int len = 0;
memset (call, 0, sizeof (struct dhcp_packet)); memset (call, 0, sizeof (struct dhcp_packet));
/* /*
@@ -514,7 +514,7 @@ dhcp_discover_req (struct dhcp_packet* call,
(*xid)++; (*xid)++;
call->xid = htonl (*xid); call->xid = htonl (*xid);
call->flags = htons (DHCP_BROADCAST); call->flags = htons (DHCP_BROADCAST);
memcpy (&call->chaddr, LLADDR (sdl), sdl->sdl_alen); memcpy (&call->chaddr, LLADDR (sdl), sdl->sdl_alen);
/* /*
@@ -567,7 +567,7 @@ dhcp_request_req (struct dhcp_packet* call,
int len = 0; int len = 0;
unsigned long temp; unsigned long temp;
char *hostname; char *hostname;
memset (call, 0, sizeof (struct dhcp_packet)); memset (call, 0, sizeof (struct dhcp_packet));
/* /*
@@ -619,7 +619,7 @@ dhcp_request_req (struct dhcp_packet* call,
call->vend[len++] = sizeof (reply->yiaddr); call->vend[len++] = sizeof (reply->yiaddr);
memcpy (&call->vend[len], &reply->yiaddr, sizeof (reply->yiaddr)); memcpy (&call->vend[len], &reply->yiaddr, sizeof (reply->yiaddr));
len += sizeof (reply->yiaddr); len += sizeof (reply->yiaddr);
/* /*
* DHCP Parameter request list * DHCP Parameter request list
*/ */
@@ -690,12 +690,12 @@ dhcp_task (rtems_task_argument _sdl)
struct proc *procp = NULL; struct proc *procp = NULL;
int disconnected; int disconnected;
rtems_status_code ev_st; rtems_status_code ev_st;
sdl = (struct sockaddr_dl *) _sdl; sdl = (struct sockaddr_dl *) _sdl;
count = dhcp_elapsed_time; count = dhcp_elapsed_time;
disconnected = 0; disconnected = 0;
while (true) while (true)
{ {
/* /*
@@ -709,7 +709,7 @@ dhcp_task (rtems_task_argument _sdl)
/* /*
* Check if not a poll timeout. So when ANY event received, exit task. * Check if not a poll timeout. So when ANY event received, exit task.
* Actually, only event RTEMS_EVENT_0 sent from rtem_dhcp_failsafe.c * Actually, only event RTEMS_EVENT_0 sent from rtem_dhcp_failsafe.c
* if "failsafe" dhcp enabled when interface down. Otherwise, no * if "failsafe" dhcp enabled when interface down. Otherwise, no
* event should occur, just timeout. * event should occur, just timeout.
*/ */
if(ev_st != RTEMS_TIMEOUT) if(ev_st != RTEMS_TIMEOUT)
@@ -720,7 +720,7 @@ dhcp_task (rtems_task_argument _sdl)
if (count >= (dhcp_lease_time / 2)) if (count >= (dhcp_lease_time / 2))
{ {
rtems_bsdnet_semaphore_obtain (); rtems_bsdnet_semaphore_obtain ();
dhcp_request_req (&call, &dhcp_req, sdl, true); dhcp_request_req (&call, &dhcp_req, sdl, true);
/* /*
@@ -744,18 +744,18 @@ dhcp_task (rtems_task_argument _sdl)
printf ("DHCP server did not send Magic Cookie.\n"); printf ("DHCP server did not send Magic Cookie.\n");
continue; continue;
} }
process_options (&dhcp_req.vend[4], sizeof (dhcp_req.vend) - 4); process_options (&dhcp_req.vend[4], sizeof (dhcp_req.vend) - 4);
if (dhcp_message_type != DHCP_ACK) if (dhcp_message_type != DHCP_ACK)
{ {
rtems_bsdnet_semaphore_release (); rtems_bsdnet_semaphore_release ();
printf ("DHCP server did not accept the DHCP request"); printf ("DHCP server did not accept the DHCP request");
continue; continue;
} }
rtems_bsdnet_semaphore_release (); rtems_bsdnet_semaphore_release ();
count = 0; count = 0;
} }
} }
@@ -776,7 +776,7 @@ dhcp_start_task (struct sockaddr_dl *sdl,
int priority) int priority)
{ {
rtems_status_code sc; rtems_status_code sc;
memcpy (&dhcp_req, reply, sizeof (struct dhcp_packet)); memcpy (&dhcp_req, reply, sizeof (struct dhcp_packet));
sc = rtems_task_create (rtems_build_name ('d','h','c','p'), sc = rtems_task_create (rtems_build_name ('d','h','c','p'),
@@ -810,14 +810,14 @@ dhcp_interface_has_ip (struct ifreq *ireq, struct socket *so, struct proc *procp
{ {
struct sockaddr_in* sin; struct sockaddr_in* sin;
int error; int error;
/* /*
* Check if the interface is already up. * Check if the interface is already up.
*/ */
error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)ireq, procp); error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)ireq, procp);
if (error) if (error)
return 0; return 0;
if ((ireq->ifr_flags & IFF_UP) == 0) if ((ireq->ifr_flags & IFF_UP) == 0)
return 0; return 0;
@@ -836,7 +836,7 @@ dhcp_interface_has_ip (struct ifreq *ireq, struct socket *so, struct proc *procp
} }
/* /*
* DCHP Client Routine * DCHP Client Routine
* - The first DHCP offer is always accepted * - The first DHCP offer is always accepted
* - No DHCP DECLINE message is sent if ARPing fails * - No DHCP DECLINE message is sent if ARPing fails
* *
@@ -869,7 +869,7 @@ dhcp_init (int update_files)
printf("Error creating the root filesystem.\nFile not created.\n"); printf("Error creating the root filesystem.\nFile not created.\n");
update_files = 0; update_files = 0;
} }
/* /*
* Find a network interface. * Find a network interface.
*/ */
@@ -938,7 +938,7 @@ dhcp_init (int update_files)
} }
process_options (&reply.vend[4], sizeof (reply.vend) - 4); process_options (&reply.vend[4], sizeof (reply.vend) - 4);
if (dhcp_message_type != DHCP_OFFER) { if (dhcp_message_type != DHCP_OFFER) {
printf ("DHCP server did not send a DHCP Offer.\n"); printf ("DHCP server did not send a DHCP Offer.\n");
soclose (so); soclose (so);
@@ -946,10 +946,10 @@ dhcp_init (int update_files)
} }
/* /*
* Send a DHCP REQUEST * Send a DHCP REQUEST
*/ */
dhcp_request_req (&call, &reply, sdl, true); dhcp_request_req (&call, &reply, sdl, true);
error = bootpc_call (&call, &reply, procp); error = bootpc_call (&call, &reply, procp);
if (error) { if (error) {
printf ("BOOTP call failed -- %s\n", strerror(error)); printf ("BOOTP call failed -- %s\n", strerror(error));
@@ -965,9 +965,9 @@ dhcp_init (int update_files)
soclose (so); soclose (so);
return -1; return -1;
} }
process_options (&reply.vend[4], sizeof (reply.vend) - 4); process_options (&reply.vend[4], sizeof (reply.vend) - 4);
if (dhcp_message_type != DHCP_ACK) { if (dhcp_message_type != DHCP_ACK) {
printf ("DHCP server did not accept the DHCP request\n"); printf ("DHCP server did not accept the DHCP request\n");
soclose (so); soclose (so);
@@ -997,13 +997,13 @@ dhcp_init (int update_files)
*/ */
if (memcmp (&reply.vend[0], dhcp_magic_cookie, sizeof (dhcp_magic_cookie)) == 0) if (memcmp (&reply.vend[0], dhcp_magic_cookie, sizeof (dhcp_magic_cookie)) == 0)
process_options (&reply.vend[4], sizeof (reply.vend) - 4); process_options (&reply.vend[4], sizeof (reply.vend) - 4);
if (dhcp_option_overload & 1) if (dhcp_option_overload & 1)
process_options ((unsigned char*) reply.file, sizeof reply.file); process_options ((unsigned char*) reply.file, sizeof reply.file);
else else
if (reply.file[0]) if (reply.file[0])
rtems_bsdnet_bootp_boot_file_name = strdup (reply.file); rtems_bsdnet_bootp_boot_file_name = strdup (reply.file);
if (dhcp_option_overload & 2) if (dhcp_option_overload & 2)
process_options ((unsigned char*) reply.sname, sizeof reply.sname); process_options ((unsigned char*) reply.sname, sizeof reply.sname);
else else
@@ -1022,13 +1022,13 @@ dhcp_init (int update_files)
else else
dhcp_netmask.sin_addr.s_addr = htonl (IN_CLASSC_NET); dhcp_netmask.sin_addr.s_addr = htonl (IN_CLASSC_NET);
} }
if (!dhcp_gotserver) if (!dhcp_gotserver)
rtems_bsdnet_bootp_server_address = reply.siaddr; rtems_bsdnet_bootp_server_address = reply.siaddr;
if (!dhcp_gotgw) if (!dhcp_gotgw)
dhcp_gw.sin_addr = reply.giaddr; dhcp_gw.sin_addr = reply.giaddr;
if (!dhcp_gotlogserver) if (!dhcp_gotlogserver)
rtems_bsdnet_log_host_address = rtems_bsdnet_bootp_server_address; rtems_bsdnet_log_host_address = rtems_bsdnet_bootp_server_address;
@@ -1076,9 +1076,9 @@ dhcp_init (int update_files)
const char *bufl[1]; const char *bufl[1];
bufl[0] = buf; bufl[0] = buf;
#define MKFILE_MODE (S_IRUSR | S_IWUSR | S_IWGRP | S_IRGRP | S_IROTH) #define MKFILE_MODE (S_IRUSR | S_IWUSR | S_IWGRP | S_IRGRP | S_IROTH)
if (rtems_bsdnet_domain_name && if (rtems_bsdnet_domain_name &&
(strlen(rtems_bsdnet_domain_name) < (sizeof(buf) - 1))) { (strlen(rtems_bsdnet_domain_name) < (sizeof(buf) - 1))) {
strcpy(buf, "search "); strcpy(buf, "search ");
@@ -1096,7 +1096,7 @@ dhcp_init (int update_files)
} }
} }
} }
/* /*
* Configure the interface with the new settings * Configure the interface with the new settings
*/ */
@@ -1108,7 +1108,7 @@ dhcp_init (int update_files)
*/ */
if (dhcp_lease_time != 0xffffffff) if (dhcp_lease_time != 0xffffffff)
dhcp_start_task (sdl, &reply, 150); dhcp_start_task (sdl, &reply, 150);
soclose (so); soclose (so);
return 0; return 0;
@@ -1171,7 +1171,7 @@ rtems_bsdnet_do_dhcp_refresh_only (unsigned long xid,
*/ */
if (lease_time == 0xffffffff) if (lease_time == 0xffffffff)
return; return;
/* /*
* Find a network interface. * Find a network interface.
*/ */
@@ -1199,7 +1199,7 @@ rtems_bsdnet_do_dhcp_refresh_only (unsigned long xid,
(sdl = ((struct sockaddr_dl *) ifa->ifa_addr)) && (sdl = ((struct sockaddr_dl *) ifa->ifa_addr)) &&
sdl->sdl_type == IFT_ETHER) sdl->sdl_type == IFT_ETHER)
break; break;
if (!match) { if (!match) {
printf ("dhcpc: no matching interface address\n"); printf ("dhcpc: no matching interface address\n");
return; return;
@@ -1220,7 +1220,7 @@ rtems_bsdnet_do_dhcp_refresh_only (unsigned long xid,
dhcp_lease_time = lease_time; dhcp_lease_time = lease_time;
dhcp_elapsed_time = elapsed_time; dhcp_elapsed_time = elapsed_time;
if (hostname) if (hostname)
{ {
sethostname ((char *) hostname, strlen (hostname)); sethostname ((char *) hostname, strlen (hostname));

View File

@@ -1,4 +1,4 @@
/* /*
$Id$ $Id$
Description: Wrapper around DHCP client to restart it when the interface Description: Wrapper around DHCP client to restart it when the interface
@@ -32,7 +32,7 @@
* Optionally, after the interface is configured (either with DHCP or * Optionally, after the interface is configured (either with DHCP or
statically), a task is started to monitor it. When the interface remains statically), a task is started to monitor it. When the interface remains
disconnected (i.e. its IFF_RUNNING flag is off) for NETWORK_FAIL_TIMEOUT disconnected (i.e. its IFF_RUNNING flag is off) for NETWORK_FAIL_TIMEOUT
seconds, the dhcp lease renewal is stopped. As soon as the interface is seconds, the dhcp lease renewal is stopped. As soon as the interface is
connected again, DHCP is started again as above. connected again, DHCP is started again as above.
If NETWORK_FAIL_TIMEOUT is set to 0, the monitor task is not started. If NETWORK_FAIL_TIMEOUT is set to 0, the monitor task is not started.

View File

@@ -1,4 +1,4 @@
/* /*
$Id$ $Id$
Description: Wrapper around DHCP client to restart it when the interface Description: Wrapper around DHCP client to restart it when the interface

View File

@@ -27,7 +27,7 @@
extern void *malloc(size_t); extern void *malloc(size_t);
/* /*
* Default allocator for mbuf data. Over-ride in user code to change * Default allocator for mbuf data. Over-ride in user code to change
* the way mbuf's are allocated. * the way mbuf's are allocated.
*/ */

View File

@@ -5,22 +5,22 @@
* *
* USERSPACE UTILITIES * USERSPACE UTILITIES
* *
* NOTE: This much simpler than the BSD ifmedia API * NOTE: This much simpler than the BSD ifmedia API
*/ */
/* /*
* Authorship * Authorship
* ---------- * ----------
* This software was created by * This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2005, * Till Straumann <strauman@slac.stanford.edu>, 2005,
* Stanford Linear Accelerator Center, Stanford University. * Stanford Linear Accelerator Center, Stanford University.
* *
* Acknowledgement of sponsorship * Acknowledgement of sponsorship
* ------------------------------ * ------------------------------
* This software was produced by * This software was produced by
* the Stanford Linear Accelerator Center, Stanford University, * the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy. * under Contract DE-AC03-76SFO0515 with the Department of Energy.
* *
* Government disclaimer of liability * Government disclaimer of liability
* ---------------------------------- * ----------------------------------
* Neither the United States nor the United States Department of Energy, * Neither the United States nor the United States Department of Energy,
@@ -29,18 +29,18 @@
* completeness, or usefulness of any data, apparatus, product, or process * completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned * disclosed, or represents that its use would not infringe privately owned
* rights. * rights.
* *
* Stanford disclaimer of liability * Stanford disclaimer of liability
* -------------------------------- * --------------------------------
* Stanford University makes no representations or warranties, express or * Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software. * implied, nor assumes any liability for the use of this software.
* *
* Stanford disclaimer of copyright * Stanford disclaimer of copyright
* -------------------------------- * --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its * Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may * copyright and all other rights in this software. Hence, anyone may
* freely use it for any purpose without restriction. * freely use it for any purpose without restriction.
* *
* Maintenance of notices * Maintenance of notices
* ---------------------- * ----------------------
* In the interest of clarity regarding the origin and status of this * In the interest of clarity regarding the origin and status of this
@@ -49,9 +49,9 @@
* or distributed by the recipient and are to be affixed to any copy of * or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or * software made or distributed by the recipient that contains a copy or
* derivative of this software. * derivative of this software.
* *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
*/ */
#include <rtems.h> #include <rtems.h>
#include <inttypes.h> #include <inttypes.h>

View File

@@ -1,24 +1,24 @@
/* Simple (default) implementation for SIOCGIFMEDIA/SIOCSIFMEDIA /* Simple (default) implementation for SIOCGIFMEDIA/SIOCSIFMEDIA
* to be used by ethernet drivers [from their ioctl]. * to be used by ethernet drivers [from their ioctl].
* *
* NOTE: This much simpler than the BSD ifmedia API * NOTE: This much simpler than the BSD ifmedia API
* *
* $Id$ * $Id$
*/ */
/* /*
* Authorship * Authorship
* ---------- * ----------
* This software was created by * This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2005, * Till Straumann <strauman@slac.stanford.edu>, 2005,
* Stanford Linear Accelerator Center, Stanford University. * Stanford Linear Accelerator Center, Stanford University.
* *
* Acknowledgement of sponsorship * Acknowledgement of sponsorship
* ------------------------------ * ------------------------------
* This software was produced by * This software was produced by
* the Stanford Linear Accelerator Center, Stanford University, * the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy. * under Contract DE-AC03-76SFO0515 with the Department of Energy.
* *
* Government disclaimer of liability * Government disclaimer of liability
* ---------------------------------- * ----------------------------------
* Neither the United States nor the United States Department of Energy, * Neither the United States nor the United States Department of Energy,
@@ -27,18 +27,18 @@
* completeness, or usefulness of any data, apparatus, product, or process * completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned * disclosed, or represents that its use would not infringe privately owned
* rights. * rights.
* *
* Stanford disclaimer of liability * Stanford disclaimer of liability
* -------------------------------- * --------------------------------
* Stanford University makes no representations or warranties, express or * Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software. * implied, nor assumes any liability for the use of this software.
* *
* Stanford disclaimer of copyright * Stanford disclaimer of copyright
* -------------------------------- * --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its * Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may * copyright and all other rights in this software. Hence, anyone may
* freely use it for any purpose without restriction. * freely use it for any purpose without restriction.
* *
* Maintenance of notices * Maintenance of notices
* ---------------------- * ----------------------
* In the interest of clarity regarding the origin and status of this * In the interest of clarity regarding the origin and status of this
@@ -47,9 +47,9 @@
* or distributed by the recipient and are to be affixed to any copy of * or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or * software made or distributed by the recipient that contains a copy or
* derivative of this software. * derivative of this software.
* *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
*/ */
#ifndef RTEMS_MII_IOCTL_H #ifndef RTEMS_MII_IOCTL_H
#define RTEMS_MII_IOCTL_H #define RTEMS_MII_IOCTL_H
@@ -122,7 +122,7 @@ int rtems_ifmedia2str (int media, char *buf, int bufsz);
* In addition to IFM_SUBTYPE_ETHERNET_DESCRIPTIONS and * In addition to IFM_SUBTYPE_ETHERNET_DESCRIPTIONS and
* IFM_SUBTYPE_ETHERNET_ALIASES, the strings * IFM_SUBTYPE_ETHERNET_ALIASES, the strings
* *
* '10' [ '0' [ '0' ]] 'b' [ 'ase' ] ( 't' | 'T' ) * '10' [ '0' [ '0' ]] 'b' [ 'ase' ] ( 't' | 'T' )
* (* if 100bT [ 'x' | 'X' ] is required here *) * (* if 100bT [ 'x' | 'X' ] is required here *)
* *
* are recognized (e.g., 10bT, 100bTX) * are recognized (e.g., 10bT, 100bTX)

View File

@@ -5,22 +5,22 @@
* *
* KERNEL PART (support for drivers) * KERNEL PART (support for drivers)
* *
* NOTE: This much simpler than the BSD ifmedia API * NOTE: This much simpler than the BSD ifmedia API
*/ */
/* /*
* Authorship * Authorship
* ---------- * ----------
* This software was created by * This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2005, * Till Straumann <strauman@slac.stanford.edu>, 2005,
* Stanford Linear Accelerator Center, Stanford University. * Stanford Linear Accelerator Center, Stanford University.
* *
* Acknowledgement of sponsorship * Acknowledgement of sponsorship
* ------------------------------ * ------------------------------
* This software was produced by * This software was produced by
* the Stanford Linear Accelerator Center, Stanford University, * the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy. * under Contract DE-AC03-76SFO0515 with the Department of Energy.
* *
* Government disclaimer of liability * Government disclaimer of liability
* ---------------------------------- * ----------------------------------
* Neither the United States nor the United States Department of Energy, * Neither the United States nor the United States Department of Energy,
@@ -29,18 +29,18 @@
* completeness, or usefulness of any data, apparatus, product, or process * completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned * disclosed, or represents that its use would not infringe privately owned
* rights. * rights.
* *
* Stanford disclaimer of liability * Stanford disclaimer of liability
* -------------------------------- * --------------------------------
* Stanford University makes no representations or warranties, express or * Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software. * implied, nor assumes any liability for the use of this software.
* *
* Stanford disclaimer of copyright * Stanford disclaimer of copyright
* -------------------------------- * --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its * Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may * copyright and all other rights in this software. Hence, anyone may
* freely use it for any purpose without restriction. * freely use it for any purpose without restriction.
* *
* Maintenance of notices * Maintenance of notices
* ---------------------- * ----------------------
* In the interest of clarity regarding the origin and status of this * In the interest of clarity regarding the origin and status of this
@@ -49,9 +49,9 @@
* or distributed by the recipient and are to be affixed to any copy of * or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or * software made or distributed by the recipient that contains a copy or
* derivative of this software. * derivative of this software.
* *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
*/ */
/* include first to avoid 'malloc' clash with rtems_bsdnet_malloc() hack */ /* include first to avoid 'malloc' clash with rtems_bsdnet_malloc() hack */

View File

@@ -2,18 +2,18 @@
* socketpair() for RTEMS * socketpair() for RTEMS
* *
* This file exists primarily to document what is required to provide * This file exists primarily to document what is required to provide
* a functional implementation of socketpair() for RTEMS. * a functional implementation of socketpair() for RTEMS.
* *
* The socketpair() service requires that the "local domain" sockets * The socketpair() service requires that the "local domain" sockets
* be functional. This is denoted by the domain constants AF_LOCAL * be functional. This is denoted by the domain constants AF_LOCAL
* and AF_UNIX and the protocol constants PF_LOCAL and PF_UNIX. The * and AF_UNIX and the protocol constants PF_LOCAL and PF_UNIX. The
* local domain functionality is implemented in the file kern/uipc_usrreq.c * local domain functionality is implemented in the file kern/uipc_usrreq.c
* which was not part of the initial port of the FreeBSD stack to * which was not part of the initial port of the FreeBSD stack to
* RTEMS. * RTEMS.
* *
* The FreeBSD socketpair implementation appears to be dependent on * The FreeBSD socketpair implementation appears to be dependent on
* file system features which are not available currently in RTEMS. * file system features which are not available currently in RTEMS.
* *
* COPYRIGHT (c) 1989-2007. * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *

View File

@@ -419,7 +419,7 @@ start_networks(void)
*/ */
void void
auth_peer_fail( auth_peer_fail(
int unit, int unit,
int protocol) int protocol)
{ {
/* /*
@@ -434,7 +434,7 @@ auth_peer_fail(
*/ */
void void
auth_peer_success( auth_peer_success(
int unit, int unit,
int protocol, int protocol,
char *name, char *name,
int namelen) int namelen)
@@ -474,7 +474,7 @@ auth_peer_success(
*/ */
void void
auth_withpeer_fail( auth_withpeer_fail(
int unit, int unit,
int protocol ) int protocol )
{ {
if (passwd_from_file) if (passwd_from_file)
@@ -494,7 +494,7 @@ auth_withpeer_fail(
*/ */
void void
auth_withpeer_success( auth_withpeer_success(
int unit, int unit,
int protocol ) int protocol )
{ {
int bit; int bit;
@@ -527,7 +527,7 @@ auth_withpeer_success(
*/ */
void void
np_up( np_up(
int unit, int unit,
int proto ) int proto )
{ {
int tlim; int tlim;
@@ -576,7 +576,7 @@ np_down(
*/ */
void void
np_finished( np_finished(
int unit, int unit,
int proto ) int proto )
{ {
if (--num_np_open <= 0) { if (--num_np_open <= 0) {

View File

@@ -166,7 +166,7 @@ cbcp_input(unit, inpacket, pktlen)
#endif #endif
len -= CBCP_MINLEN; len -= CBCP_MINLEN;
switch(code) { switch(code) {
case CBCP_REQ: case CBCP_REQ:
us->us_id = id; us->us_id = id;
@@ -229,7 +229,7 @@ cbcp_printpkt(p, plen, printer, arg)
if (code >= 1 && code <= sizeof(cbcp_codenames) / sizeof(char *)) if (code >= 1 && code <= sizeof(cbcp_codenames) / sizeof(char *))
printer(arg, " %s", cbcp_codenames[code-1]); printer(arg, " %s", cbcp_codenames[code-1]);
else else
printer(arg, " code=0x%x", code); printer(arg, " code=0x%x", code);
printer(arg, " id=0x%x", id); printer(arg, " id=0x%x", id);
len -= HEADERLEN; len -= HEADERLEN;
@@ -252,7 +252,7 @@ cbcp_printpkt(p, plen, printer, arg)
if (opt >= 1 && opt <= sizeof(cbcp_optionnames) / sizeof(char *)) if (opt >= 1 && opt <= sizeof(cbcp_optionnames) / sizeof(char *))
printer(arg, " %s", cbcp_optionnames[opt-1]); printer(arg, " %s", cbcp_optionnames[opt-1]);
else else
printer(arg, " option=0x%x", opt); printer(arg, " option=0x%x", opt);
if (olen > 2) { if (olen > 2) {
GETCHAR(delay, p); GETCHAR(delay, p);
@@ -401,13 +401,13 @@ cbcp_send(us, code, buf, len)
outp = outpacket_buf; outp = outpacket_buf;
outlen = 4 + len; outlen = 4 + len;
MAKEHEADER(outp, PPP_CBCP); MAKEHEADER(outp, PPP_CBCP);
PUTCHAR(code, outp); PUTCHAR(code, outp);
PUTCHAR(us->us_id, outp); PUTCHAR(us->us_id, outp);
PUTSHORT(outlen, outp); PUTSHORT(outlen, outp);
if (len) if (len)
BCOPY(buf, outp, len); BCOPY(buf, outp, len);
@@ -427,7 +427,7 @@ cbcp_recvack(us, pckt, len)
if (len) { if (len) {
GETCHAR(type, pckt); GETCHAR(type, pckt);
GETCHAR(opt_len, pckt); GETCHAR(opt_len, pckt);
if (opt_len > 2) if (opt_len > 2)
GETCHAR(delay, pckt); GETCHAR(delay, pckt);

View File

@@ -68,7 +68,7 @@ static option_t ccp_option_list[] = {
"don't use draft deflate #", OPT_A2COPY, "don't use draft deflate #", OPT_A2COPY,
&ccp_allowoptions[0].deflate_draft, 0, 0 }, &ccp_allowoptions[0].deflate_draft, 0, 0 },
{ "predictor1", o_bool, &ccp_wantoptions[0].predictor_1, { "predictor1", o_bool, &ccp_wantoptions[0].predictor_1,
"request Predictor-1", 1, "request Predictor-1", 1,
&ccp_allowoptions[0].predictor_1, 0, 0 }, &ccp_allowoptions[0].predictor_1, 0, 0 },
{ "nopredictor1", o_bool, &ccp_wantoptions[0].predictor_1, { "nopredictor1", o_bool, &ccp_wantoptions[0].predictor_1,
"don't allow Predictor-1", OPT_A2COPY, "don't allow Predictor-1", OPT_A2COPY,
@@ -979,7 +979,7 @@ ccp_reqci(
*/ */
static char * static char *
method_name( method_name(
ccp_options *opt, ccp_options *opt,
ccp_options *opt2) ccp_options *opt2)
{ {
static char result[64]; static char result[64];

View File

@@ -159,7 +159,7 @@ ChapAuthWithPeer(
/* /*
* We get here as a result of LCP coming up. * We get here as a result of LCP coming up.
* So even if CHAP was open before, we will * So even if CHAP was open before, we will
* have to re-authenticate ourselves. * have to re-authenticate ourselves.
*/ */
cstate->clientstate = CHAPCS_LISTEN; cstate->clientstate = CHAPCS_LISTEN;
@@ -176,7 +176,7 @@ ChapAuthPeer(
int digest) int digest)
{ {
chap_state *cstate = &chap[unit]; chap_state *cstate = &chap[unit];
cstate->chal_name = our_name; cstate->chal_name = our_name;
cstate->chal_type = digest; cstate->chal_type = digest;
@@ -201,7 +201,7 @@ ChapChallengeTimeout(
void *arg) void *arg)
{ {
chap_state *cstate = (chap_state *) arg; chap_state *cstate = (chap_state *) arg;
/* if we aren't sending challenges, don't worry. then again we */ /* if we aren't sending challenges, don't worry. then again we */
/* probably shouldn't be here either */ /* probably shouldn't be here either */
if (cstate->serverstate != CHAPSS_INITIAL_CHAL && if (cstate->serverstate != CHAPSS_INITIAL_CHAL &&
@@ -266,7 +266,7 @@ ChapLowerUp(
int unit) int unit)
{ {
chap_state *cstate = &chap[unit]; chap_state *cstate = &chap[unit];
if (cstate->clientstate == CHAPCS_INITIAL) if (cstate->clientstate == CHAPCS_INITIAL)
cstate->clientstate = CHAPCS_CLOSED; cstate->clientstate = CHAPCS_CLOSED;
else if (cstate->clientstate == CHAPCS_PENDING) else if (cstate->clientstate == CHAPCS_PENDING)
@@ -292,7 +292,7 @@ ChapLowerDown(
int unit) int unit)
{ {
chap_state *cstate = &chap[unit]; chap_state *cstate = &chap[unit];
/* Timeout(s) pending? Cancel if so. */ /* Timeout(s) pending? Cancel if so. */
if (cstate->serverstate == CHAPSS_INITIAL_CHAL || if (cstate->serverstate == CHAPSS_INITIAL_CHAL ||
cstate->serverstate == CHAPSS_RECHALLENGE) cstate->serverstate == CHAPSS_RECHALLENGE)
@@ -340,7 +340,7 @@ ChapInput(
u_char *inp; u_char *inp;
u_char code, id; u_char code, id;
int len; int len;
/* /*
* Parse header (code, id and length). * Parse header (code, id and length).
* If packet too short, drop it. * If packet too short, drop it.
@@ -362,7 +362,7 @@ ChapInput(
return; return;
} }
len -= CHAP_HEADERLEN; len -= CHAP_HEADERLEN;
/* /*
* Action depends on code (as in fact it usually does :-). * Action depends on code (as in fact it usually does :-).
*/ */
@@ -370,11 +370,11 @@ ChapInput(
case CHAP_CHALLENGE: case CHAP_CHALLENGE:
ChapReceiveChallenge(cstate, inp, id, len); ChapReceiveChallenge(cstate, inp, id, len);
break; break;
case CHAP_RESPONSE: case CHAP_RESPONSE:
ChapReceiveResponse(cstate, inp, id, len); ChapReceiveResponse(cstate, inp, id, len);
break; break;
case CHAP_FAILURE: case CHAP_FAILURE:
ChapReceiveFailure(cstate, inp, id, len); ChapReceiveFailure(cstate, inp, id, len);
break; break;
@@ -407,7 +407,7 @@ ChapReceiveChallenge(
char rhostname[256]; char rhostname[256];
MD5_CTX mdContext; MD5_CTX mdContext;
u_char hash[MD5_SIGNATURE_SIZE]; u_char hash[MD5_SIGNATURE_SIZE];
if (cstate->clientstate == CHAPCS_CLOSED || if (cstate->clientstate == CHAPCS_CLOSED ||
cstate->clientstate == CHAPCS_PENDING) { cstate->clientstate == CHAPCS_PENDING) {
CHAPDEBUG(("ChapReceiveChallenge: in state %d", cstate->clientstate)); CHAPDEBUG(("ChapReceiveChallenge: in state %d", cstate->clientstate));
@@ -455,7 +455,7 @@ ChapReceiveChallenge(
cstate->resp_transmits = 0; cstate->resp_transmits = 0;
/* generate MD based on negotiated type */ /* generate MD based on negotiated type */
switch (cstate->resp_type) { switch (cstate->resp_type) {
case CHAP_DIGEST_MD5: case CHAP_DIGEST_MD5:
MD5Init(&mdContext); MD5Init(&mdContext);
@@ -556,7 +556,7 @@ ChapReceiveResponse(
} else { } else {
/* generate MD based on negotiated type */ /* generate MD based on negotiated type */
switch (cstate->chal_type) { switch (cstate->chal_type) {
case CHAP_DIGEST_MD5: /* only MD5 is defined for now */ case CHAP_DIGEST_MD5: /* only MD5 is defined for now */
if (remmd_len != MD5_SIGNATURE_SIZE) if (remmd_len != MD5_SIGNATURE_SIZE)
@@ -565,7 +565,7 @@ ChapReceiveResponse(
MD5Update(&mdContext, &cstate->chal_id, 1); MD5Update(&mdContext, &cstate->chal_id, 1);
MD5Update(&mdContext, secret, secret_len); MD5Update(&mdContext, secret, secret_len);
MD5Update(&mdContext, cstate->challenge, cstate->chal_len); MD5Update(&mdContext, cstate->challenge, cstate->chal_len);
MD5Final(hash, &mdContext); MD5Final(hash, &mdContext);
/* compare local and remote MDs and send the appropriate status */ /* compare local and remote MDs and send the appropriate status */
if (memcmp (hash, remmd, MD5_SIGNATURE_SIZE) == 0) if (memcmp (hash, remmd, MD5_SIGNATURE_SIZE) == 0)
@@ -690,7 +690,7 @@ ChapSendChallenge(
BCOPY(cstate->chal_name, outp, name_len); /* append hostname */ BCOPY(cstate->chal_name, outp, name_len); /* append hostname */
output(cstate->unit, outpacket_buf, outlen + PPP_HDRLEN); output(cstate->unit, outpacket_buf, outlen + PPP_HDRLEN);
TIMEOUT(ChapChallengeTimeout, cstate, cstate->timeouttime); TIMEOUT(ChapChallengeTimeout, cstate, cstate->timeouttime);
++cstate->chal_transmits; ++cstate->chal_transmits;
} }
@@ -718,7 +718,7 @@ ChapSendStatus(
outp = outpacket_buf; outp = outpacket_buf;
MAKEHEADER(outp, PPP_CHAP); /* paste in a header */ MAKEHEADER(outp, PPP_CHAP); /* paste in a header */
PUTCHAR(code, outp); PUTCHAR(code, outp);
PUTCHAR(cstate->chal_id, outp); PUTCHAR(cstate->chal_id, outp);
PUTSHORT(outlen, outp); PUTSHORT(outlen, outp);
@@ -741,8 +741,8 @@ ChapGenChallenge(
u_char *ptr = cstate->challenge; u_char *ptr = cstate->challenge;
int i; int i;
/* pick a random challenge length between MIN_CHALLENGE_LENGTH and /* pick a random challenge length between MIN_CHALLENGE_LENGTH and
MAX_CHALLENGE_LENGTH */ MAX_CHALLENGE_LENGTH */
chal_len = (unsigned) ((drand48() * chal_len = (unsigned) ((drand48() *
(MAX_CHALLENGE_LENGTH - MIN_CHALLENGE_LENGTH)) + (MAX_CHALLENGE_LENGTH - MIN_CHALLENGE_LENGTH)) +
MIN_CHALLENGE_LENGTH); MIN_CHALLENGE_LENGTH);

View File

@@ -47,7 +47,7 @@
* In the same vein as above, added CLR_REPORT keyword. * In the same vein as above, added CLR_REPORT keyword.
* *
* Allow for comments. Line starting with '#' are comments and are * Allow for comments. Line starting with '#' are comments and are
* ignored. If a '#' is to be expected as the first character, the * ignored. If a '#' is to be expected as the first character, the
* expect string must be quoted. * expect string must be quoted.
* *
* *
@@ -85,7 +85,7 @@
/* $Id$ */ /* $Id$ */
/* /*
Fixes and some Changes by Wilfried Busalski Lancier-Monitoring GmbH Germany Fixes and some Changes by Wilfried Busalski Lancier-Monitoring GmbH Germany
wilfried.busalski@muenster.de wilfried.busalski@muenster.de
Fixes: put_string() Free memory allocated by clean() Fixes: put_string() Free memory allocated by clean()
@@ -179,7 +179,7 @@ int clear_abort_next = 0;
char *report_string[MAX_REPORTS] ; char *report_string[MAX_REPORTS] ;
char report_buffer[50] ; char report_buffer[50] ;
int n_reports = 0, report_next = 0, report_gathering = 0 ; int n_reports = 0, report_next = 0, report_gathering = 0 ;
int clear_report_next = 0; int clear_report_next = 0;
int say_next = 0, hup_next = 0; int say_next = 0, hup_next = 0;
@@ -246,7 +246,7 @@ int chatmain(int fd, int mode, char *pScript)
ttyfd = fd; ttyfd = fd;
script=pScript; script=pScript;
if ( debug ) { if ( debug ) {
dbglog("chat_main: %s\n", script); dbglog("chat_main: %s\n", script);
} }
@@ -359,7 +359,7 @@ static char *clean(
case 'T': case 'T':
if (sending && phone_num) { if (sending && phone_num) {
for (phchar = phone_num; *phchar != '\0'; phchar++) for (phchar = phone_num; *phchar != '\0'; phchar++)
*s1++ = *phchar; *s1++ = *phchar;
} }
else { else {
@@ -370,7 +370,7 @@ static char *clean(
case 'U': case 'U':
if (sending && phone_num2) { if (sending && phone_num2) {
for (phchar = phone_num2; *phchar != '\0'; phchar++) for (phchar = phone_num2; *phchar != '\0'; phchar++)
*s1++ = *phchar; *s1++ = *phchar;
} }
else { else {
@@ -407,7 +407,7 @@ static char *clean(
else else
*s1++ = 'N'; *s1++ = 'N';
break; break;
case '$': /* ARI */ case '$': /* ARI */
if (use_env) { if (use_env) {
*s1++ = cur_chr; *s1++ = cur_chr;
@@ -517,7 +517,7 @@ void chat_expect (
++hup_next; ++hup_next;
return; return;
} }
if (strcmp(s, "ABORT") == 0) { if (strcmp(s, "ABORT") == 0) {
++abort_next; ++abort_next;
return; return;

View File

@@ -326,28 +326,28 @@ fsm_input(
case CONFREQ: case CONFREQ:
fsm_rconfreq(f, id, inp, len); fsm_rconfreq(f, id, inp, len);
break; break;
case CONFACK: case CONFACK:
fsm_rconfack(f, id, inp, len); fsm_rconfack(f, id, inp, len);
break; break;
case CONFNAK: case CONFNAK:
case CONFREJ: case CONFREJ:
fsm_rconfnakrej(f, code, id, inp, len); fsm_rconfnakrej(f, code, id, inp, len);
break; break;
case TERMREQ: case TERMREQ:
fsm_rtermreq(f, id, inp, len); fsm_rtermreq(f, id, inp, len);
break; break;
case TERMACK: case TERMACK:
fsm_rtermack(f); fsm_rtermack(f);
break; break;
case CODEREJ: case CODEREJ:
fsm_rcoderej(f, inp, len); fsm_rcoderej(f, inp, len);
break; break;
default: default:
if( !f->callbacks->extcode if( !f->callbacks->extcode
|| !(*f->callbacks->extcode)(f, code, id, inp, len) ) || !(*f->callbacks->extcode)(f, code, id, inp, len) )

View File

@@ -1019,7 +1019,7 @@ ipcp_reqci(
* Reset all his options. * Reset all his options.
*/ */
BZERO(ho, sizeof(*ho)); BZERO(ho, sizeof(*ho));
/* /*
* Process all his options. * Process all his options.
*/ */
@@ -1193,7 +1193,7 @@ ipcp_reqci(
ho->vj_protocol = cishort; ho->vj_protocol = cishort;
if (cilen == CILEN_VJ) { if (cilen == CILEN_VJ) {
GETCHAR(maxslotindex, p); GETCHAR(maxslotindex, p);
if (maxslotindex > ao->maxslotindex) { if (maxslotindex > ao->maxslotindex) {
orc = CONFNAK; orc = CONFNAK;
if (!reject_if_disagree){ if (!reject_if_disagree){
DECPTR(1, p); DECPTR(1, p);
@@ -1427,7 +1427,7 @@ ipcp_up(
} }
/* assign a default route through the interface if required */ /* assign a default route through the interface if required */
if (ipcp_wantoptions[f->unit].default_route) if (ipcp_wantoptions[f->unit].default_route)
if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr)) if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
default_route_set[f->unit] = 1; default_route_set[f->unit] = 1;
@@ -1474,7 +1474,7 @@ ipcp_up(
sifnpmode(f->unit, PPP_IP, NPMODE_PASS); sifnpmode(f->unit, PPP_IP, NPMODE_PASS);
/* assign a default route through the interface if required */ /* assign a default route through the interface if required */
if (ipcp_wantoptions[f->unit].default_route) if (ipcp_wantoptions[f->unit].default_route)
if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr)) if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
default_route_set[f->unit] = 1; default_route_set[f->unit] = 1;

View File

@@ -40,7 +40,7 @@
#define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/ #define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/
#define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */ #define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */
/* compression option*/ /* compression option*/
typedef struct ipcp_options { typedef struct ipcp_options {
bool neg_addr; /* Negotiate IP Address? */ bool neg_addr; /* Negotiate IP Address? */

View File

@@ -419,7 +419,7 @@ lcp_extcode(
case PROTREJ: case PROTREJ:
lcp_rprotrej(f, inp, len); lcp_rprotrej(f, inp, len);
break; break;
case ECHOREQ: case ECHOREQ:
if (f->state != OPENED) if (f->state != OPENED)
break; break;
@@ -427,7 +427,7 @@ lcp_extcode(
PUTLONG(lcp_gotoptions[f->unit].magicnumber, magp); PUTLONG(lcp_gotoptions[f->unit].magicnumber, magp);
fsm_sdata(f, ECHOREP, id, inp, len); fsm_sdata(f, ECHOREP, id, inp, len);
break; break;
case ECHOREP: case ECHOREP:
lcp_received_echo_reply(f, id, inp, len); lcp_received_echo_reply(f, id, inp, len);
break; break;
@@ -441,7 +441,7 @@ lcp_extcode(
return 1; return 1;
} }
/* /*
* lcp_rprotrej - Receive an Protocol-Reject. * lcp_rprotrej - Receive an Protocol-Reject.
* *
@@ -1930,7 +1930,7 @@ lcp_echo_lowerup (
lcp_echos_pending = 0; lcp_echos_pending = 0;
lcp_echo_number = 0; lcp_echo_number = 0;
lcp_echo_timer_running = 0; lcp_echo_timer_running = 0;
/* If a timeout interval is specified then start the timer */ /* If a timeout interval is specified then start the timer */
if (lcp_echo_interval != 0) if (lcp_echo_interval != 0)
LcpEchoCheck (f); LcpEchoCheck (f);

View File

@@ -1168,7 +1168,7 @@ setpassfilter(
{ {
pc.linktype = DLT_PPP; pc.linktype = DLT_PPP;
pc.snapshot = PPP_HDRLEN; pc.snapshot = PPP_HDRLEN;
if (pcap_compile(&pc, &pass_filter, *argv, 1, netmask) == 0) if (pcap_compile(&pc, &pass_filter, *argv, 1, netmask) == 0)
return 1; return 1;
option_error("error in pass-filter expression: %s\n", pcap_geterr(&pc)); option_error("error in pass-filter expression: %s\n", pcap_geterr(&pc));
@@ -1184,7 +1184,7 @@ setactivefilter(
{ {
pc.linktype = DLT_PPP; pc.linktype = DLT_PPP;
pc.snapshot = PPP_HDRLEN; pc.snapshot = PPP_HDRLEN;
if (pcap_compile(&pc, &active_filter, *argv, 1, netmask) == 0) if (pcap_compile(&pc, &active_filter, *argv, 1, netmask) == 0)
return 1; return 1;
option_error("error in active-filter expression: %s\n", pcap_geterr(&pc)); option_error("error in active-filter expression: %s\n", pcap_geterr(&pc));
@@ -1208,7 +1208,7 @@ noopt(
} }
/* /*
* setdomain - Set domain name to append to hostname * setdomain - Set domain name to append to hostname
*/ */
static int static int
setdomain( setdomain(
@@ -1335,7 +1335,7 @@ setdevname(
default_device = 0; default_device = 0;
devnam_info.priv = privileged_option; devnam_info.priv = privileged_option;
devnam_info.source = option_source; devnam_info.source = option_source;
return 1; return 1;
} }
@@ -1351,7 +1351,7 @@ setipaddr(
char *colon; char *colon;
uint32_t local, remote; uint32_t local, remote;
ipcp_options *wo = &ipcp_wantoptions[0]; ipcp_options *wo = &ipcp_wantoptions[0];
/* /*
* IP address pair separated by ":". * IP address pair separated by ":".
*/ */
@@ -1359,7 +1359,7 @@ setipaddr(
return 0; return 0;
if (prepass) if (prepass)
return 1; return 1;
/* /*
* If colon first character, then no local addr. * If colon first character, then no local addr.
*/ */
@@ -1381,7 +1381,7 @@ setipaddr(
wo->ouraddr = local; wo->ouraddr = local;
*colon = ':'; *colon = ':';
} }
/* /*
* If colon last character, then no remote addr. * If colon last character, then no remote addr.
*/ */

View File

@@ -758,9 +758,9 @@ ppptimeout(
int time) int time)
{ {
struct callout *newp, *p, **pp; struct callout *newp, *p, **pp;
MAINDEBUG(("Timeout %p:%p in %d seconds.", func, arg, time)); MAINDEBUG(("Timeout %p:%p in %d seconds.", func, arg, time));
/* /*
* Allocate timeout. * Allocate timeout.
*/ */
@@ -771,7 +771,7 @@ ppptimeout(
gettimeofday(&timenow, NULL); gettimeofday(&timenow, NULL);
newp->c_time.tv_sec = timenow.tv_sec + time; newp->c_time.tv_sec = timenow.tv_sec + time;
newp->c_time.tv_usec = timenow.tv_usec; newp->c_time.tv_usec = timenow.tv_usec;
/* /*
* Find correct place and link it in. * Find correct place and link it in.
*/ */
@@ -794,9 +794,9 @@ pppuntimeout(
void *arg) void *arg)
{ {
struct callout **copp, *freep; struct callout **copp, *freep;
MAINDEBUG(("Untimeout %p:%p.", func, arg)); MAINDEBUG(("Untimeout %p:%p.", func, arg));
/* /*
* Find first matching timeout and remove it from the list. * Find first matching timeout and remove it from the list.
*/ */

View File

@@ -6,7 +6,7 @@
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at * found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE. * http://www.rtems.com/license/LICENSE.
* *
* $Id$ * $Id$
*/ */

View File

@@ -6,7 +6,7 @@
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at * found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE. * http://www.rtems.com/license/LICENSE.
* *
* $Id$ * $Id$
*/ */

View File

@@ -583,7 +583,7 @@ ppp_send_config(
int unit, int unit,
int mtu, int mtu,
uint32_t asyncmap, uint32_t asyncmap,
int pcomp, int pcomp,
int accomp) int accomp)
{ {
u_int x; u_int x;
@@ -626,7 +626,7 @@ ppp_set_xaccm(
*/ */
void void
ppp_recv_config( ppp_recv_config(
int unit, int unit,
int mru, int mru,
uint32_t asyncmap, uint32_t asyncmap,
int pcomp, int accomp) int pcomp, int accomp)
@@ -977,7 +977,7 @@ dodefaultroute(
memset((void *) &netmask, 0, sizeof(netmask)); memset((void *) &netmask, 0, sizeof(netmask));
netmask.sin_len = sizeof netmask; netmask.sin_len = sizeof netmask;
netmask.sin_addr.s_addr = INADDR_ANY; netmask.sin_addr.s_addr = INADDR_ANY;
netmask.sin_family = AF_INET; netmask.sin_family = AF_INET;
if (cmd=='s') { if (cmd=='s') {

View File

@@ -122,7 +122,7 @@ upap_init(int unit)
void void
upap_authwithpeer( upap_authwithpeer(
int unit, int unit,
char *user, char *user,
char *password) char *password)
{ {
upap_state *u = &upap[unit]; upap_state *u = &upap[unit];
@@ -505,7 +505,7 @@ upap_sauthreq(upap_state *u)
outlen = UPAP_HEADERLEN + 2 * sizeof (u_char) + outlen = UPAP_HEADERLEN + 2 * sizeof (u_char) +
u->us_userlen + u->us_passwdlen; u->us_userlen + u->us_passwdlen;
outp = outpacket_buf; outp = outpacket_buf;
MAKEHEADER(outp, PPP_PAP); MAKEHEADER(outp, PPP_PAP);
PUTCHAR(UPAP_AUTHREQ, outp); PUTCHAR(UPAP_AUTHREQ, outp);

View File

@@ -49,21 +49,21 @@ rtems_status_code rtems_clock_get(
return RTEMS_INVALID_ADDRESS; return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD ) if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
rtems_interval *interval = (rtems_interval *)time_buffer; rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot(); *interval = rtems_clock_get_ticks_since_boot();
return RTEMS_SUCCESSFUL; return RTEMS_SUCCESSFUL;
} }
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer; rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second(); *interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL; return RTEMS_SUCCESSFUL;
} }

View File

@@ -53,6 +53,6 @@ rtems_status_code rtems_clock_get_tod(
tmbuf->second = time.tm_sec; tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec / tmbuf->ticks = now.tv_usec /
rtems_configuration_get_microseconds_per_tick(); rtems_configuration_get_microseconds_per_tick();
return RTEMS_SUCCESSFUL; return RTEMS_SUCCESSFUL;
} }

View File

@@ -45,7 +45,7 @@ rtems_status_code rtems_clock_get_uptime(
{ {
if ( !uptime ) if ( !uptime )
return RTEMS_INVALID_ADDRESS; return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime ); _TOD_Get_uptime_as_timespec( uptime );
return RTEMS_SUCCESSFUL; return RTEMS_SUCCESSFUL;
} }

View File

@@ -49,7 +49,7 @@ rtems_status_code rtems_clock_set(
if ( _TOD_Validate( time_buffer ) ) { if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer ); newtime.tv_sec = _TOD_To_seconds( time_buffer );
newtime.tv_nsec = time_buffer->ticks * newtime.tv_nsec = time_buffer->ticks *
rtems_configuration_get_nanoseconds_per_tick(); rtems_configuration_get_nanoseconds_per_tick();
_Thread_Disable_dispatch(); _Thread_Disable_dispatch();

View File

@@ -54,7 +54,7 @@ bool _TOD_Validate(
uint32_t days_in_month; uint32_t days_in_month;
uint32_t ticks_per_second; uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND / ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick(); rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) || if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) || (the_tod->ticks >= ticks_per_second) ||

View File

@@ -75,13 +75,13 @@ void _Event_Surrender(
* If we are in an ISR and sending to the current thread, then * If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with. * we have a critical section issue to deal with.
*/ */
if ( _ISR_Is_in_progress() && if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) && _Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events ); api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0; the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
} }

View File

@@ -53,7 +53,7 @@ void _Message_queue_Manager_initialization(void)
&_Message_queue_Information, /* object information table */ &_Message_queue_Information, /* object information table */
OBJECTS_CLASSIC_API, /* object API */ OBJECTS_CLASSIC_API, /* object API */
OBJECTS_RTEMS_MESSAGE_QUEUES, /* object class */ OBJECTS_RTEMS_MESSAGE_QUEUES, /* object class */
Configuration_RTEMS_API.maximum_message_queues, Configuration_RTEMS_API.maximum_message_queues,
/* maximum objects of this class */ /* maximum objects of this class */
sizeof( Message_queue_Control ), sizeof( Message_queue_Control ),
/* size of this object's control block */ /* size of this object's control block */

View File

@@ -61,7 +61,7 @@ void _Rate_monotonic_Initiate_statistics(
* When this routine is invoked from _Rate_monotonic_Timeout, it will not. * When this routine is invoked from _Rate_monotonic_Timeout, it will not.
*/ */
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
if (owning_thread == _Thread_Executing) { if (owning_thread == _Thread_Executing) {
rtems_thread_cpu_usage_t ran; rtems_thread_cpu_usage_t ran;
@@ -126,7 +126,7 @@ void _Rate_monotonic_Update_statistics(
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
{ {
Thread_CPU_usage_t ran, used; Thread_CPU_usage_t ran, used;
/* Grab CPU usage when the thread got switched in */ /* Grab CPU usage when the thread got switched in */
used = _Thread_Executing->cpu_time_used; used = _Thread_Executing->cpu_time_used;
@@ -141,7 +141,7 @@ void _Rate_monotonic_Update_statistics(
_Timestamp_Add_to( &used, &ran ); _Timestamp_Add_to( &used, &ran );
/* executed = current cpu usage - value at start of period */ /* executed = current cpu usage - value at start of period */
_Timestamp_Subtract( _Timestamp_Subtract(
&the_period->owner_executed_at_period, &the_period->owner_executed_at_period,
&used, &used,
&executed &executed
@@ -163,10 +163,10 @@ void _Rate_monotonic_Update_statistics(
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_Timestamp_Add_to( &stats->total_cpu_time, &executed ); _Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
stats->min_cpu_time = executed; stats->min_cpu_time = executed;
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
stats->max_cpu_time = executed; stats->max_cpu_time = executed;
#else #else
stats->total_cpu_time += executed; stats->total_cpu_time += executed;

View File

@@ -110,7 +110,7 @@ ididididid NNNN ccccc mmmmmm X
status = rtems_rate_monotonic_get_statistics( id, &the_stats ); status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL ) if ( status != RTEMS_SUCCESSFUL )
continue; continue;
/* If the above passed, so should this but check it anyway */ /* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status ); status = rtems_rate_monotonic_get_status( id, &the_status );
#if defined(RTEMS_DEBUG) #if defined(RTEMS_DEBUG)
@@ -121,7 +121,7 @@ ididididid NNNN ccccc mmmmmm X
rtems_object_get_name( the_status.owner, sizeof(name), name ); rtems_object_get_name( the_status.owner, sizeof(name), name );
/* /*
* Print part of report line that is not dependent on granularity * Print part of report line that is not dependent on granularity
*/ */
(*print)( context, (*print)( context,
"0x%08" PRIx32 " %4s %5" PRId32 " %6" PRId32 " ", "0x%08" PRIx32 " %4s %5" PRId32 " %6" PRId32 " ",

View File

@@ -51,10 +51,10 @@ void _Region_Process_queue(
* Switch from using the memory allocation mutex to using a * Switch from using the memory allocation mutex to using a
* dispatching disabled critical section. We have to do this * dispatching disabled critical section. We have to do this
* because this thread may unblock one or more threads that were * because this thread may unblock one or more threads that were
* waiting on memory. * waiting on memory.
* *
* NOTE: Be sure to disable dispatching before unlocking the mutex * NOTE: Be sure to disable dispatching before unlocking the mutex
* since we do not want to open a window where a context * since we do not want to open a window where a context
* switch could occur. * switch could occur.
*/ */
_Thread_Disable_dispatch(); _Thread_Disable_dispatch();

View File

@@ -28,4 +28,4 @@ rtems_id rtems_build_id(
) )
{ {
return _Objects_Build_id( api, class, node, index ); return _Objects_Build_id( api, class, node, index );
} }

View File

@@ -28,4 +28,4 @@ rtems_name rtems_build_name(
) )
{ {
return _Objects_Build_name( C1, C2, C3, C4 ); return _Objects_Build_name( C1, C2, C3, C4 );
} }

View File

@@ -70,13 +70,13 @@ rtems_assoc_t rtems_object_api_itron_assoc[] = {
#endif #endif
const char *rtems_object_get_api_class_name( const char *rtems_object_get_api_class_name(
int the_api, int the_api,
int the_class int the_class
) )
{ {
const rtems_assoc_t *api_assoc; const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc; const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API ) if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc; api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API ) else if ( the_api == OBJECTS_CLASSIC_API )

View File

@@ -22,10 +22,10 @@
#include <rtems/assoc.h> #include <rtems/assoc.h>
rtems_assoc_t rtems_objects_api_assoc[] = { rtems_assoc_t rtems_objects_api_assoc[] = {
{ "Internal", OBJECTS_INTERNAL_API, 0}, { "Internal", OBJECTS_INTERNAL_API, 0},
{ "Classic", OBJECTS_CLASSIC_API, 0}, { "Classic", OBJECTS_CLASSIC_API, 0},
{ "POSIX", OBJECTS_POSIX_API, 0}, { "POSIX", OBJECTS_POSIX_API, 0},
{ "ITRON", OBJECTS_ITRON_API, 0}, { "ITRON", OBJECTS_ITRON_API, 0},
{ 0, 0, 0 } { 0, 0, 0 }
}; };

View File

@@ -30,4 +30,4 @@ char *rtems_object_get_name(
) )
{ {
return _Objects_Get_name_as_string( id, length, name ); return _Objects_Get_name_as_string( id, length, name );
} }

View File

@@ -25,4 +25,4 @@ int rtems_object_id_get_api(
) )
{ {
return _Objects_Get_API( id ); return _Objects_Get_API( id );
} }

View File

@@ -25,4 +25,4 @@ int rtems_object_id_get_class(
) )
{ {
return _Objects_Get_class( id ); return _Objects_Get_class( id );
} }

View File

@@ -25,4 +25,4 @@ int rtems_object_id_get_index(
) )
{ {
return _Objects_Get_index( id ); return _Objects_Get_index( id );
} }

View File

@@ -25,4 +25,4 @@ int rtems_object_id_get_node(
) )
{ {
return _Objects_Get_node( id ); return _Objects_Get_node( id );
} }

View File

@@ -44,7 +44,7 @@ rtems_status_code rtems_object_set_name(
information = _Objects_Get_information_id( tmpId ); information = _Objects_Get_information_id( tmpId );
if ( !information ) if ( !information )
return RTEMS_INVALID_ID; return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location ); the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) { switch ( location ) {

View File

@@ -196,7 +196,7 @@ rtems_status_code rtems_semaphore_create(
&the_semaphore->Core_control.mutex, &the_semaphore->Core_control.mutex,
&the_mutex_attr, &the_mutex_attr,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
); );
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
_Semaphore_Free( the_semaphore ); _Semaphore_Free( the_semaphore );

View File

@@ -63,7 +63,7 @@ rtems_status_code rtems_task_get_note(
if ( !rtems_configuration_get_notepads_enabled() ) if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED; return RTEMS_NOT_CONFIGURED;
if ( !note ) if ( !note )
return RTEMS_INVALID_ADDRESS; return RTEMS_INVALID_ADDRESS;

View File

@@ -61,7 +61,7 @@ rtems_status_code rtems_task_set_note(
if ( !rtems_configuration_get_notepads_enabled() ) if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED; return RTEMS_NOT_CONFIGURED;
/* /*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative. * be checking an unsigned number for being negative.

View File

@@ -49,7 +49,7 @@ rtems_status_code rtems_task_variable_delete(
if (tvp->ptr == ptr) { if (tvp->ptr == ptr) {
if (prev) if (prev)
prev->next = tvp->next; prev->next = tvp->next;
else else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next; the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );

View File

@@ -43,8 +43,8 @@
macros are designed to work with all sizes of flash memory. macros are designed to work with all sizes of flash memory.
Global interrupts are not automatically disabled for these macros. It Global interrupts are not automatically disabled for these macros. It
is left up to the programmer to do this. See the code example below. is left up to the programmer to do this. See the code example below.
Also see the processor datasheet for caveats on having global interrupts Also see the processor datasheet for caveats on having global interrupts
enabled during writing of the Flash. enabled during writing of the Flash.
\note Not all AVR processors provide bootloader support. See your \note Not all AVR processors provide bootloader support. See your
@@ -62,7 +62,7 @@
#include <inttypes.h> #include <inttypes.h>
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
void boot_program_page (uint32_t page, uint8_t *buf) void boot_program_page (uint32_t page, uint8_t *buf)
{ {
uint16_t i; uint16_t i;
@@ -72,7 +72,7 @@
sreg = SREG; sreg = SREG;
cli(); cli();
eeprom_busy_wait (); eeprom_busy_wait ();
boot_page_erase (page); boot_page_erase (page);
@@ -84,7 +84,7 @@
uint16_t w = *buf++; uint16_t w = *buf++;
w += (*buf++) << 8; w += (*buf++) << 8;
boot_page_fill (page + i, w); boot_page_fill (page + i, w);
} }
@@ -379,11 +379,11 @@
If bits 5..2 in R0 are cleared (zero), the corresponding Boot Lock bit If bits 5..2 in R0 are cleared (zero), the corresponding Boot Lock bit
will be programmed if an SPM instruction is executed within four cycles will be programmed if an SPM instruction is executed within four cycles
after BLBSET and SPMEN (or SELFPRGEN) are set in SPMCR. The Z-pointer is after BLBSET and SPMEN (or SELFPRGEN) are set in SPMCR. The Z-pointer is
don't care during this operation, but for future compatibility it is don't care during this operation, but for future compatibility it is
recommended to load the Z-pointer with $0001 (same as used for reading the recommended to load the Z-pointer with $0001 (same as used for reading the
Lock bits). For future compatibility It is also recommended to set bits 7, Lock bits). For future compatibility It is also recommended to set bits 7,
6, 1, and 0 in R0 to 1 when writing the Lock bits. When programming the 6, 1, and 0 in R0 to 1 when writing the Lock bits. When programming the
Lock bits the entire Flash can be read during the operation. */ Lock bits the entire Flash can be read during the operation. */
#define __boot_lock_bits_set(lock_bits) \ #define __boot_lock_bits_set(lock_bits) \
@@ -427,8 +427,8 @@
/* /*
Reading lock and fuse bits: Reading lock and fuse bits:
Similarly to writing the lock bits above, set BLBSET and SPMEN (or Similarly to writing the lock bits above, set BLBSET and SPMEN (or
SELFPRGEN) bits in __SPMREG, and then (within four clock cycles) issue an SELFPRGEN) bits in __SPMREG, and then (within four clock cycles) issue an
LPM instruction. LPM instruction.
Z address: contents: Z address: contents:
@@ -526,13 +526,13 @@
/** \ingroup avr_boot /** \ingroup avr_boot
\def boot_page_fill(address, data) \def boot_page_fill(address, data)
Fill the bootloader temporary page buffer for flash Fill the bootloader temporary page buffer for flash
address with data word. address with data word.
\note The address is a byte address. The data is a word. The AVR \note The address is a byte address. The data is a word. The AVR
writes data to the buffer a word at a time, but addresses the buffer writes data to the buffer a word at a time, but addresses the buffer
per byte! So, increment your address by 2 between calls, and send 2 per byte! So, increment your address by 2 between calls, and send 2
data bytes in a word format! The LSB of the data is written to the lower data bytes in a word format! The LSB of the data is written to the lower
address; the MSB of the data is written to the higher address.*/ address; the MSB of the data is written to the higher address.*/
/** \ingroup avr_boot /** \ingroup avr_boot
@@ -545,9 +545,9 @@
/** \ingroup avr_boot /** \ingroup avr_boot
\def boot_page_write(address) \def boot_page_write(address)
Write the bootloader temporary page buffer Write the bootloader temporary page buffer
to flash page that contains address. to flash page that contains address.
\note address is a byte address in flash, not a word address. */ \note address is a byte address in flash, not a word address. */
/** \ingroup avr_boot /** \ingroup avr_boot
@@ -582,7 +582,7 @@
instruction sequences after LPM. instruction sequences after LPM.
FLASHEND is defined in the ioXXXX.h file. FLASHEND is defined in the ioXXXX.h file.
USHRT_MAX is defined in <limits.h>. */ USHRT_MAX is defined in <limits.h>. */
#if defined(__AVR_ATmega161__) || defined(__AVR_ATmega163__) \ #if defined(__AVR_ATmega161__) || defined(__AVR_ATmega163__) \
|| defined(__AVR_ATmega323__) || defined(__AVR_ATmega323__)

View File

@@ -36,9 +36,9 @@
#include <avr/sfr_defs.h> #include <avr/sfr_defs.h>
/* /*
This purpose of this header is to define registers that have not been This purpose of this header is to define registers that have not been
previously defined in the individual device IO header files, and to define previously defined in the individual device IO header files, and to define
other symbols that are common across AVR device families. other symbols that are common across AVR device families.
This file is designed to be included in <avr/io.h> after the individual This file is designed to be included in <avr/io.h> after the individual
@@ -48,7 +48,7 @@ device IO header files, and after <avr/sfr_defs.h>
/*------------ Registers Not Previously Defined ------------*/ /*------------ Registers Not Previously Defined ------------*/
/* /*
These are registers that are not previously defined in the individual These are registers that are not previously defined in the individual
IO header files, OR they are defined here because they are used in parts of IO header files, OR they are defined here because they are used in parts of
avr-libc even if a device is not selected but a general architecture has avr-libc even if a device is not selected but a general architecture has
@@ -59,7 +59,7 @@ been selected.
/* /*
Stack pointer register. Stack pointer register.
AVR architecture 1 has no RAM, thus no stack pointer. AVR architecture 1 has no RAM, thus no stack pointer.
All other architectures do have a stack pointer. Some devices have only All other architectures do have a stack pointer. Some devices have only
less than 256 bytes of possible RAM locations (128 Bytes of SRAM less than 256 bytes of possible RAM locations (128 Bytes of SRAM
@@ -76,7 +76,7 @@ for them.
# ifndef SP # ifndef SP
# define SP _SFR_MEM16(0x3D) # define SP _SFR_MEM16(0x3D)
# endif # endif
#elif __AVR_ARCH__ != 1 #elif __AVR_ARCH__ != 1
# ifndef SPL # ifndef SPL
# define SPL _SFR_IO8(0x3D) # define SPL _SFR_IO8(0x3D)
# endif # endif
@@ -193,7 +193,7 @@ keep the EEPROM-related definitions here.
/*------------ Common Symbols ------------*/ /*------------ Common Symbols ------------*/
/* /*
Generic definitions for registers that are common across multiple AVR devices Generic definitions for registers that are common across multiple AVR devices
and families. and families.
*/ */

View File

@@ -185,7 +185,7 @@ void __eewr_block (void *, const void *, size_t, void (*)(uint8_t *, uint8_t));
\ingroup avr_eeprom \ingroup avr_eeprom
Loops until the eeprom is no longer busy. Loops until the eeprom is no longer busy.
\returns Nothing. \returns Nothing.
*/ */
#define eeprom_busy_wait() do {} while (!eeprom_is_ready()) #define eeprom_busy_wait() do {} while (!eeprom_is_ready())
@@ -201,7 +201,7 @@ __ATTR_PURE__ static __inline__ uint8_t eeprom_read_byte (const uint8_t *__p)
EEAR = (size_t)__p; EEAR = (size_t)__p;
#endif #endif
/* Use inline assembly below as some AVRs have problems with accessing /* Use inline assembly below as some AVRs have problems with accessing
EECR with STS instructions. For example, see errata for ATmega64. EECR with STS instructions. For example, see errata for ATmega64.
The code below also assumes that EECR and EEDR are in the I/O space. The code below also assumes that EECR and EEDR are in the I/O space.
*/ */
uint8_t __result; uint8_t __result;

View File

@@ -49,37 +49,37 @@
the ELF file, by extracting this information and determining if the fuses the ELF file, by extracting this information and determining if the fuses
need to be programmed before programming the Flash and EEPROM memories. need to be programmed before programming the Flash and EEPROM memories.
This also allows a single ELF file to contain all the This also allows a single ELF file to contain all the
information needed to program an AVR. information needed to program an AVR.
To use the Fuse API, include the <avr/io.h> header file, which in turn To use the Fuse API, include the <avr/io.h> header file, which in turn
automatically includes the individual I/O header file and the <avr/fuse.h> automatically includes the individual I/O header file and the <avr/fuse.h>
file. These other two files provides everything necessary to set the AVR file. These other two files provides everything necessary to set the AVR
fuses. fuses.
\par Fuse API \par Fuse API
Each I/O header file must define the FUSE_MEMORY_SIZE macro which is Each I/O header file must define the FUSE_MEMORY_SIZE macro which is
defined to the number of fuse bytes that exist in the AVR device. defined to the number of fuse bytes that exist in the AVR device.
A new type, __fuse_t, is defined as a structure. The number of fields in A new type, __fuse_t, is defined as a structure. The number of fields in
this structure are determined by the number of fuse bytes in the this structure are determined by the number of fuse bytes in the
FUSE_MEMORY_SIZE macro. FUSE_MEMORY_SIZE macro.
If FUSE_MEMORY_SIZE == 1, there is only a single field: byte, of type If FUSE_MEMORY_SIZE == 1, there is only a single field: byte, of type
unsigned char. unsigned char.
If FUSE_MEMORY_SIZE == 2, there are two fields: low, and high, of type If FUSE_MEMORY_SIZE == 2, there are two fields: low, and high, of type
unsigned char. unsigned char.
If FUSE_MEMORY_SIZE == 3, there are three fields: low, high, and extended, If FUSE_MEMORY_SIZE == 3, there are three fields: low, high, and extended,
of type unsigned char. of type unsigned char.
If FUSE_MEMORY_SIZE > 3, there is a single field: byte, which is an array If FUSE_MEMORY_SIZE > 3, there is a single field: byte, which is an array
of unsigned char with the size of the array being FUSE_MEMORY_SIZE. of unsigned char with the size of the array being FUSE_MEMORY_SIZE.
A convenience macro, FUSEMEM, is defined as a GCC attribute for a A convenience macro, FUSEMEM, is defined as a GCC attribute for a
custom-named section of ".fuse". custom-named section of ".fuse".
A convenience macro, FUSES, is defined that declares a variable, __fuse, of A convenience macro, FUSES, is defined that declares a variable, __fuse, of
type __fuse_t with the attribute defined by FUSEMEM. This variable type __fuse_t with the attribute defined by FUSEMEM. This variable
allows the end user to easily set the fuse data. allows the end user to easily set the fuse data.
@@ -97,20 +97,20 @@
\code \code
#define FUSE_EESAVE ~_BV(3) #define FUSE_EESAVE ~_BV(3)
\endcode \endcode
\note The _BV macro creates a bit mask from a bit number. It is then \note The _BV macro creates a bit mask from a bit number. It is then
inverted to represent logical values for a fuse memory byte. inverted to represent logical values for a fuse memory byte.
To combine the fuse bits macros together to represent a whole fuse byte, To combine the fuse bits macros together to represent a whole fuse byte,
use the bitwise AND operator, like so: use the bitwise AND operator, like so:
\code \code
(FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN) (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN)
\endcode \endcode
Each device I/O header file also defines macros that provide default values Each device I/O header file also defines macros that provide default values
for each fuse byte that is available. LFUSE_DEFAULT is defined for a Low for each fuse byte that is available. LFUSE_DEFAULT is defined for a Low
Fuse byte. HFUSE_DEFAULT is defined for a High Fuse byte. EFUSE_DEFAULT Fuse byte. HFUSE_DEFAULT is defined for a High Fuse byte. EFUSE_DEFAULT
is defined for an Extended Fuse byte. is defined for an Extended Fuse byte.
If FUSE_MEMORY_SIZE > 3, then the I/O header file defines macros that If FUSE_MEMORY_SIZE > 3, then the I/O header file defines macros that
provide default values for each fuse byte like so: provide default values for each fuse byte like so:
FUSE0_DEFAULT FUSE0_DEFAULT
@@ -119,15 +119,15 @@
FUSE3_DEFAULT FUSE3_DEFAULT
FUSE4_DEFAULT FUSE4_DEFAULT
.... ....
\par API Usage Example \par API Usage Example
Putting all of this together is easy. Using C99's designated initializers: Putting all of this together is easy. Using C99's designated initializers:
\code \code
#include <avr/io.h> #include <avr/io.h>
FUSES = FUSES =
{ {
.low = LFUSE_DEFAULT, .low = LFUSE_DEFAULT,
.high = (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN), .high = (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN),
@@ -139,13 +139,13 @@
return 0; return 0;
} }
\endcode \endcode
Or, using the variable directly instead of the FUSES macro, Or, using the variable directly instead of the FUSES macro,
\code \code
#include <avr/io.h> #include <avr/io.h>
__fuse_t __fuse __attribute__((section (".fuse"))) = __fuse_t __fuse __attribute__((section (".fuse"))) =
{ {
.low = LFUSE_DEFAULT, .low = LFUSE_DEFAULT,
.high = (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN), .high = (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN),
@@ -157,14 +157,14 @@
return 0; return 0;
} }
\endcode \endcode
If you are compiling in C++, you cannot use the designated intializers so If you are compiling in C++, you cannot use the designated intializers so
you must do: you must do:
\code \code
#include <avr/io.h> #include <avr/io.h>
FUSES = FUSES =
{ {
LFUSE_DEFAULT, // .low LFUSE_DEFAULT, // .low
(FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN), // .high (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN), // .high
@@ -176,33 +176,33 @@
return 0; return 0;
} }
\endcode \endcode
However there are a number of caveats that you need to be aware of to However there are a number of caveats that you need to be aware of to
use this API properly. use this API properly.
Be sure to include <avr/io.h> to get all of the definitions for the API. Be sure to include <avr/io.h> to get all of the definitions for the API.
The FUSES macro defines a global variable to store the fuse data. This The FUSES macro defines a global variable to store the fuse data. This
variable is assigned to its own linker section. Assign the desired fuse variable is assigned to its own linker section. Assign the desired fuse
values immediately in the variable initialization. values immediately in the variable initialization.
The .fuse section in the ELF file will get its values from the initial The .fuse section in the ELF file will get its values from the initial
variable assignment ONLY. This means that you can NOT assign values to variable assignment ONLY. This means that you can NOT assign values to
this variable in functions and the new values will not be put into the this variable in functions and the new values will not be put into the
ELF .fuse section. ELF .fuse section.
The global variable is declared in the FUSES macro has two leading The global variable is declared in the FUSES macro has two leading
underscores, which means that it is reserved for the "implementation", underscores, which means that it is reserved for the "implementation",
meaning the library, so it will not conflict with a user-named variable. meaning the library, so it will not conflict with a user-named variable.
You must initialize ALL fields in the __fuse_t structure. This is because You must initialize ALL fields in the __fuse_t structure. This is because
the fuse bits in all bytes default to a logical 1, meaning unprogrammed. the fuse bits in all bytes default to a logical 1, meaning unprogrammed.
Normal uninitialized data defaults to all locgial zeros. So it is vital that Normal uninitialized data defaults to all locgial zeros. So it is vital that
all fuse bytes are initialized, even with default data. If they are not, all fuse bytes are initialized, even with default data. If they are not,
then the fuse bits may not programmed to the desired settings. then the fuse bits may not programmed to the desired settings.
Be sure to have the -mmcu=<em>device</em> flag in your compile command line and Be sure to have the -mmcu=<em>device</em> flag in your compile command line and
your linker command line to have the correct device selected and to have your linker command line to have the correct device selected and to have
the correct I/O header file included when you include <avr/io.h>. the correct I/O header file included when you include <avr/io.h>.
You can print out the contents of the .fuse section in the ELF file by You can print out the contents of the .fuse section in the ELF file by

View File

@@ -42,16 +42,16 @@
#define __STRINGIFY(x) #x #define __STRINGIFY(x) #x
#endif /* !defined(__DOXYGEN__) */ #endif /* !defined(__DOXYGEN__) */
/** /**
\file \file
\@{ \@{
*/ */
/** \name Global manipulation of the interrupt flag /** \name Global manipulation of the interrupt flag
The global interrupt flag is maintained in the I bit of the status The global interrupt flag is maintained in the I bit of the status
register (SREG). register (SREG).
*/ */
#if defined(__DOXYGEN__) #if defined(__DOXYGEN__)
@@ -209,7 +209,7 @@
} }
ISR_ALIAS(INT1_vect, INT0_vect); ISR_ALIAS(INT1_vect, INT0_vect);
\endcode \endcode
*/ */
# define ISR_ALIAS(vector, target_vector) # define ISR_ALIAS(vector, target_vector)
#else /* real code */ #else /* real code */

View File

@@ -45,7 +45,7 @@
but most of the details come from the respective include file. but most of the details come from the respective include file.
Note that this file always includes the following files: Note that this file always includes the following files:
\code \code
#include <avr/sfr_defs.h> #include <avr/sfr_defs.h>
#include <avr/portpins.h> #include <avr/portpins.h>
#include <avr/common.h> #include <avr/common.h>
@@ -71,8 +71,8 @@
<br> <br>
- \b XRAMEND - \b XRAMEND
<br> <br>
The last possible RAM location that is addressable. This is equal to The last possible RAM location that is addressable. This is equal to
RAMEND for devices that do not allow for external RAM. For devices RAMEND for devices that do not allow for external RAM. For devices
that allow external RAM, this will be larger than RAMEND. that allow external RAM, this will be larger than RAMEND.
<br> <br>
- \b E2END - \b E2END
@@ -86,11 +86,11 @@
- \b SPM_PAGESIZE - \b SPM_PAGESIZE
<br> <br>
For devices with bootloader support, the flash pagesize For devices with bootloader support, the flash pagesize
(in bytes) to be used for the \c SPM instruction. (in bytes) to be used for the \c SPM instruction.
- \b E2PAGESIZE - \b E2PAGESIZE
<br> <br>
The size of the EEPROM page. The size of the EEPROM page.
*/ */
#ifndef _AVR_IO_H_ #ifndef _AVR_IO_H_

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io1200.h" # define _AVR_IOXXX_H_ "io1200.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
#ifndef __ASSEMBLER__ #ifndef __ASSEMBLER__
# warning "MCU not supported by the C compiler" # warning "MCU not supported by the C compiler"

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io2313.h" # define _AVR_IOXXX_H_ "io2313.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */
@@ -190,48 +190,48 @@
/* /*
* The Register Bit names are represented by their bit number (0-7). * The Register Bit names are represented by their bit number (0-7).
*/ */
/* General Interrupt MaSK register */ /* General Interrupt MaSK register */
#define INT1 7 #define INT1 7
#define INT0 6 #define INT0 6
/* General Interrupt Flag Register */ /* General Interrupt Flag Register */
#define INTF1 7 #define INTF1 7
#define INTF0 6 #define INTF0 6
/* Timer/Counter Interrupt MaSK register */ /* Timer/Counter Interrupt MaSK register */
#define TOIE1 7 #define TOIE1 7
#define OCIE1A 6 #define OCIE1A 6
#define TICIE 3 /* old name */ #define TICIE 3 /* old name */
#define TICIE1 3 #define TICIE1 3
#define TOIE0 1 #define TOIE0 1
/* Timer/Counter Interrupt Flag register */ /* Timer/Counter Interrupt Flag register */
#define TOV1 7 #define TOV1 7
#define OCF1A 6 #define OCF1A 6
#define ICF1 3 #define ICF1 3
#define TOV0 1 #define TOV0 1
/* MCU general Control Register */ /* MCU general Control Register */
#define SE 5 #define SE 5
#define SM 4 #define SM 4
#define ISC11 3 #define ISC11 3
#define ISC10 2 #define ISC10 2
#define ISC01 1 #define ISC01 1
#define ISC00 0 #define ISC00 0
/* Timer/Counter 0 Control Register */ /* Timer/Counter 0 Control Register */
#define CS02 2 #define CS02 2
#define CS01 1 #define CS01 1
#define CS00 0 #define CS00 0
/* Timer/Counter 1 Control Register */ /* Timer/Counter 1 Control Register */
#define COM1A1 7 #define COM1A1 7
#define COM1A0 6 #define COM1A0 6
#define PWM11 1 #define PWM11 1
#define PWM10 0 #define PWM10 0
/* Timer/Counter 1 Control and Status Register */ /* Timer/Counter 1 Control and Status Register */
#define ICNC1 7 #define ICNC1 7
#define ICES1 6 #define ICES1 6
@@ -239,20 +239,20 @@
#define CS12 2 #define CS12 2
#define CS11 1 #define CS11 1
#define CS10 0 #define CS10 0
/* Watchdog Timer Control Register */ /* Watchdog Timer Control Register */
#define WDTOE 4 #define WDTOE 4
#define WDE 3 #define WDE 3
#define WDP2 2 #define WDP2 2
#define WDP1 1 #define WDP1 1
#define WDP0 0 #define WDP0 0
/* EEPROM Control Register */ /* EEPROM Control Register */
#define EEMWE 2 #define EEMWE 2
#define EEWE 1 #define EEWE 1
#define EERE 0 #define EERE 0
/* Data Register, Port B */ /* Data Register, Port B */
#define PB7 7 #define PB7 7
#define PB6 6 #define PB6 6
#define PB5 5 #define PB5 5
@@ -261,7 +261,7 @@
#define PB2 2 #define PB2 2
#define PB1 1 #define PB1 1
#define PB0 0 #define PB0 0
/* Data Direction Register, Port B */ /* Data Direction Register, Port B */
#define DDB7 7 #define DDB7 7
#define DDB6 6 #define DDB6 6
@@ -271,7 +271,7 @@
#define DDB2 2 #define DDB2 2
#define DDB1 1 #define DDB1 1
#define DDB0 0 #define DDB0 0
/* Input Pins, Port B */ /* Input Pins, Port B */
#define PINB7 7 #define PINB7 7
#define PINB6 6 #define PINB6 6
@@ -281,7 +281,7 @@
#define PINB2 2 #define PINB2 2
#define PINB1 1 #define PINB1 1
#define PINB0 0 #define PINB0 0
/* Data Register, Port D */ /* Data Register, Port D */
#define PD6 6 #define PD6 6
#define PD5 5 #define PD5 5
@@ -290,7 +290,7 @@
#define PD2 2 #define PD2 2
#define PD1 1 #define PD1 1
#define PD0 0 #define PD0 0
/* Data Direction Register, Port D */ /* Data Direction Register, Port D */
#define DDD6 6 #define DDD6 6
#define DDD5 5 #define DDD5 5
@@ -299,7 +299,7 @@
#define DDD2 2 #define DDD2 2
#define DDD1 1 #define DDD1 1
#define DDD0 0 #define DDD0 0
/* Input Pins, Port D */ /* Input Pins, Port D */
#define PIND6 6 #define PIND6 6
#define PIND5 5 #define PIND5 5
@@ -308,14 +308,14 @@
#define PIND2 2 #define PIND2 2
#define PIND1 1 #define PIND1 1
#define PIND0 0 #define PIND0 0
/* UART Status Register */ /* UART Status Register */
#define RXC 7 #define RXC 7
#define TXC 6 #define TXC 6
#define UDRE 5 #define UDRE 5
#define FE 4 #define FE 4
#define DOR 3 #define DOR 3
/* UART Control Register */ /* UART Control Register */
#define RXCIE 7 #define RXCIE 7
#define TXCIE 6 #define TXCIE 6
@@ -325,8 +325,8 @@
#define CHR9 2 #define CHR9 2
#define RXB8 1 #define RXB8 1
#define TXB8 0 #define TXB8 0
/* Analog Comparator Control and Status Register */ /* Analog Comparator Control and Status Register */
#define ACD 7 #define ACD 7
#define ACO 5 #define ACO 5
#define ACI 4 #define ACI 4
@@ -340,8 +340,8 @@
#define EEMWE 2 #define EEMWE 2
#define EEWE 1 #define EEWE 1
#define EERE 0 #define EERE 0
/* Constants */ /* Constants */
#define RAMEND 0xDF #define RAMEND 0xDF
#define XRAMEND RAMEND #define XRAMEND RAMEND
#define E2END 0x7F #define E2END 0x7F

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io2323.h" # define _AVR_IOXXX_H_ "io2323.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io2333.h" # define _AVR_IOXXX_H_ "io2333.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io2343.h" # define _AVR_IOXXX_H_ "io2343.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io43u32x.h" # define _AVR_IOXXX_H_ "io43u32x.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */
@@ -71,7 +71,7 @@
#define DDRE _SFR_IO8(0x02) #define DDRE _SFR_IO8(0x02)
/* Data Register, Port E */ /* Data Register, Port E */
#define PORTE _SFR_IO8(0x03) #define PORTE _SFR_IO8(0x03)
/* SPI Control Register */ /* SPI Control Register */
#define SPCR _SFR_IO8(0x0D) #define SPCR _SFR_IO8(0x0D)

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io43u35x.h" # define _AVR_IOXXX_H_ "io43u35x.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */
@@ -417,7 +417,7 @@
#define ADIE 3 #define ADIE 3
#define ADPS2 2 #define ADPS2 2
#define ADPS1 1 #define ADPS1 1
#define ADPS0 0 #define ADPS0 0
/* Constants */ /* Constants */
#define RAMEND 0x045F /*Last On-Chip SRAM Location*/ #define RAMEND 0x045F /*Last On-Chip SRAM Location*/

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io4414.h" # define _AVR_IOXXX_H_ "io4414.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io4433.h" # define _AVR_IOXXX_H_ "io4433.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io4434.h" # define _AVR_IOXXX_H_ "io4434.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io76c711.h" # define _AVR_IOXXX_H_ "io76c711.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io8515.h" # define _AVR_IOXXX_H_ "io8515.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io8534.h" # define _AVR_IOXXX_H_ "io8534.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io8535.h" # define _AVR_IOXXX_H_ "io8535.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */

View File

@@ -83,7 +83,7 @@
#define BTCNT _SFR_IO8(0x20) #define BTCNT _SFR_IO8(0x20)
/* /*
NOTE: EEPROM name's changed to have D in front on them, per datasheet, but NOTE: EEPROM name's changed to have D in front on them, per datasheet, but
you may want to remove the leading D. you may want to remove the leading D.
*/ */

View File

@@ -46,7 +46,7 @@
# define _AVR_IOXXX_H_ "iopwm1.h" # define _AVR_IOXXX_H_ "iopwm1.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */
@@ -1115,7 +1115,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
#endif /* _AVR_IOPWM1_H_ */ #endif /* _AVR_IOPWM1_H_ */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io90pwm216.h" # define _AVR_IOXXX_H_ "io90pwm216.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */
@@ -1169,7 +1169,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -26,7 +26,7 @@
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
/* $Id$ */ /* $Id$ */
@@ -43,7 +43,7 @@
# define _AVR_IOXXX_H_ "io90pwm2b.h" # define _AVR_IOXXX_H_ "io90pwm2b.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
#ifndef _AVR_IO90PWM2B_H_ #ifndef _AVR_IO90PWM2B_H_
@@ -80,7 +80,7 @@
#define PORTB5 5 #define PORTB5 5
#define PORTB6 6 #define PORTB6 6
#define PORTB7 7 #define PORTB7 7
#define PINC _SFR_IO8(0x06) #define PINC _SFR_IO8(0x06)
#define PINC0 0 #define PINC0 0
#define PINC1 1 #define PINC1 1
@@ -818,7 +818,7 @@
#define STP0 0 #define STP0 0
#define STP1 1 #define STP1 1
#define F1617 2 #define F1617 2
#define FEM 3 #define FEM 3
#define MUBRR _SFR_MEM16(0xCC) #define MUBRR _SFR_MEM16(0xCC)
@@ -1363,7 +1363,7 @@
#define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */ #define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */
#define FUSE_DWEN (unsigned char)~_BV(6) /* debugWIRE Enable */ #define FUSE_DWEN (unsigned char)~_BV(6) /* debugWIRE Enable */
#define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External Reset Disable */ #define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External Reset Disable */
#define HFUSE_DEFAULT (FUSE_SPIEN) #define HFUSE_DEFAULT (FUSE_SPIEN)
/* Extended Fuse Byte */ /* Extended Fuse Byte */
@@ -1380,7 +1380,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io90pwm316.h" # define _AVR_IOXXX_H_ "io90pwm316.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */
@@ -1212,7 +1212,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -26,7 +26,7 @@
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
/* $Id$ */ /* $Id$ */
@@ -43,7 +43,7 @@
# define _AVR_IOXXX_H_ "io90pwm3b.h" # define _AVR_IOXXX_H_ "io90pwm3b.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
#ifndef _AVR_IO90PWM3B_H_ #ifndef _AVR_IO90PWM3B_H_
@@ -80,7 +80,7 @@
#define PORTB5 5 #define PORTB5 5
#define PORTB6 6 #define PORTB6 6
#define PORTB7 7 #define PORTB7 7
#define PINC _SFR_IO8(0x06) #define PINC _SFR_IO8(0x06)
#define PINC0 0 #define PINC0 0
#define PINC1 1 #define PINC1 1
@@ -818,7 +818,7 @@
#define STP0 0 #define STP0 0
#define STP1 1 #define STP1 1
#define F1617 2 #define F1617 2
#define FEM 3 #define FEM 3
#define MUBRR _SFR_MEM16(0xCC) #define MUBRR _SFR_MEM16(0xCC)
@@ -1363,7 +1363,7 @@
#define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */ #define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */
#define FUSE_DWEN (unsigned char)~_BV(6) /* debugWIRE Enable */ #define FUSE_DWEN (unsigned char)~_BV(6) /* debugWIRE Enable */
#define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External Reset Disable */ #define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External Reset Disable */
#define HFUSE_DEFAULT (FUSE_SPIEN) #define HFUSE_DEFAULT (FUSE_SPIEN)
/* Extended Fuse Byte */ /* Extended Fuse Byte */
@@ -1380,7 +1380,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -42,7 +42,7 @@
# define _AVR_IOXXX_H_ "io90pwm81.h" # define _AVR_IOXXX_H_ "io90pwm81.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
#ifndef _AVR_AT90PWM81_H_ #ifndef _AVR_AT90PWM81_H_

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "io90pwmX.h" # define _AVR_IOXXX_H_ "io90pwmX.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */
@@ -1365,7 +1365,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
#endif /* _AVR_IO90PWMX_H_ */ #endif /* _AVR_IO90PWMX_H_ */

View File

@@ -42,7 +42,7 @@
# define _AVR_IOXXX_H_ "io90scr100.h" # define _AVR_IOXXX_H_ "io90scr100.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
#ifndef _AVR_AT90SCR100_H_ #ifndef _AVR_AT90SCR100_H_

View File

@@ -42,7 +42,7 @@
# define _AVR_IOXXX_H_ "ioa6289.h" # define _AVR_IOXXX_H_ "ioa6289.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
#ifndef _AVR_ATA6289_H_ #ifndef _AVR_ATA6289_H_

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "ioat94k.h" # define _AVR_IOXXX_H_ "ioat94k.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */
@@ -210,33 +210,33 @@
/* Interrupt vectors */ /* Interrupt vectors */
#define SIG_FPGA_INTERRUPT0 _VECTOR(1) /* FPGA_INT0 */ #define SIG_FPGA_INTERRUPT0 _VECTOR(1) /* FPGA_INT0 */
#define SIG_INTERRUPT0 _VECTOR(2) /* EXT_INT0 */ #define SIG_INTERRUPT0 _VECTOR(2) /* EXT_INT0 */
#define SIG_FPGA_INTERRUPT1 _VECTOR(3) /* FPGA_INT1 */ #define SIG_FPGA_INTERRUPT1 _VECTOR(3) /* FPGA_INT1 */
#define SIG_INTERRUPT1 _VECTOR(4) /* EXT_INT1 */ #define SIG_INTERRUPT1 _VECTOR(4) /* EXT_INT1 */
#define SIG_FPGA_INTERRUPT2 _VECTOR(5) /* FPGA_INT2 */ #define SIG_FPGA_INTERRUPT2 _VECTOR(5) /* FPGA_INT2 */
#define SIG_INTERRUPT2 _VECTOR(6) /* EXT_INT2 */ #define SIG_INTERRUPT2 _VECTOR(6) /* EXT_INT2 */
#define SIG_FPGA_INTERRUPT3 _VECTOR(7) /* FPGA_INT3 */ #define SIG_FPGA_INTERRUPT3 _VECTOR(7) /* FPGA_INT3 */
#define SIG_INTERRUPT3 _VECTOR(8) /* EXT_INT3 */ #define SIG_INTERRUPT3 _VECTOR(8) /* EXT_INT3 */
#define SIG_OUTPUT_COMPARE2 _VECTOR(9) /* TIM2_COMP */ #define SIG_OUTPUT_COMPARE2 _VECTOR(9) /* TIM2_COMP */
#define SIG_OVERFLOW2 _VECTOR(10) /* TIM2_OVF */ #define SIG_OVERFLOW2 _VECTOR(10) /* TIM2_OVF */
#define SIG_INPUT_CAPTURE1 _VECTOR(11) /* TIM1_CAPT */ #define SIG_INPUT_CAPTURE1 _VECTOR(11) /* TIM1_CAPT */
#define SIG_OUTPUT_COMPARE1A _VECTOR(12) /* TIM1_COMPA */ #define SIG_OUTPUT_COMPARE1A _VECTOR(12) /* TIM1_COMPA */
#define SIG_OUTPUT_COMPARE1B _VECTOR(13) /* TIM1_COMPB */ #define SIG_OUTPUT_COMPARE1B _VECTOR(13) /* TIM1_COMPB */
#define SIG_OVERFLOW1 _VECTOR(14) /* TIM1_OVF */ #define SIG_OVERFLOW1 _VECTOR(14) /* TIM1_OVF */
#define SIG_OUTPUT_COMPARE0 _VECTOR(15) /* TIM0_COMP */ #define SIG_OUTPUT_COMPARE0 _VECTOR(15) /* TIM0_COMP */
#define SIG_OVERFLOW0 _VECTOR(16) /* TIM0_OVF */ #define SIG_OVERFLOW0 _VECTOR(16) /* TIM0_OVF */
#define SIG_FPGA_INTERRUPT4 _VECTOR(17) /* FPGA_INT4 */ #define SIG_FPGA_INTERRUPT4 _VECTOR(17) /* FPGA_INT4 */
#define SIG_FPGA_INTERRUPT5 _VECTOR(18) /* FPGA_INT5 */ #define SIG_FPGA_INTERRUPT5 _VECTOR(18) /* FPGA_INT5 */
#define SIG_FPGA_INTERRUPT6 _VECTOR(19) /* FPGA_INT6 */ #define SIG_FPGA_INTERRUPT6 _VECTOR(19) /* FPGA_INT6 */
#define SIG_FPGA_INTERRUPT7 _VECTOR(20) /* FPGA_INT7 */ #define SIG_FPGA_INTERRUPT7 _VECTOR(20) /* FPGA_INT7 */
#define SIG_UART0_RECV _VECTOR(21) /* UART0_RXC */ #define SIG_UART0_RECV _VECTOR(21) /* UART0_RXC */
#define SIG_UART0_DATA _VECTOR(22) /* UART0_DRE */ #define SIG_UART0_DATA _VECTOR(22) /* UART0_DRE */
#define SIG_UART0_TRANS _VECTOR(23) /* UART0_TXC */ #define SIG_UART0_TRANS _VECTOR(23) /* UART0_TXC */
#define SIG_FPGA_INTERRUPT8 _VECTOR(24) /* FPGA_INT8 */ #define SIG_FPGA_INTERRUPT8 _VECTOR(24) /* FPGA_INT8 */
#define SIG_FPGA_INTERRUPT9 _VECTOR(25) /* FPGA_INT9 */ #define SIG_FPGA_INTERRUPT9 _VECTOR(25) /* FPGA_INT9 */
#define SIG_FPGA_INTERRUPT10 _VECTOR(26) /* FPGA_INT10 */ #define SIG_FPGA_INTERRUPT10 _VECTOR(26) /* FPGA_INT10 */
#define SIG_FPGA_INTERRUPT11 _VECTOR(27) /* FPGA_INT11 */ #define SIG_FPGA_INTERRUPT11 _VECTOR(27) /* FPGA_INT11 */
#define SIG_UART1_RECV _VECTOR(28) /* UART1_RXC */ #define SIG_UART1_RECV _VECTOR(28) /* UART1_RXC */
#define SIG_UART1_DATA _VECTOR(29) /* UART1_DRE */ #define SIG_UART1_DATA _VECTOR(29) /* UART1_DRE */
#define SIG_UART1_TRANS _VECTOR(30) /* UART1_TXC */ #define SIG_UART1_TRANS _VECTOR(30) /* UART1_TXC */

View File

@@ -82,7 +82,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -82,7 +82,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -82,7 +82,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -53,7 +53,7 @@
# define _AVR_IOXXX_H_ "iocanxx.h" # define _AVR_IOXXX_H_ "iocanxx.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers and bit definitions. */ /* I/O registers and bit definitions. */
@@ -952,9 +952,9 @@
#define ADPS0 0 #define ADPS0 0
/* End Register Bits */ /* End Register Bits */
/* /*
The ADHSM bit has been removed from all documentation, The ADHSM bit has been removed from all documentation,
as being not needed at all since the comparator has proven as being not needed at all since the comparator has proven
to be fast enough even without feeding it more power. to be fast enough even without feeding it more power.
*/ */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "iom103.h" # define _AVR_IOXXX_H_ "iom103.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */

View File

@@ -31,7 +31,7 @@
/* $Id$ */ /* $Id$ */
/* avr/iom128.h - defines for ATmega128 /* avr/iom128.h - defines for ATmega128
As of 2002-08-27: As of 2002-08-27:
- This should be up to date with data sheet 2467E-AVR-05/02 */ - This should be up to date with data sheet 2467E-AVR-05/02 */
@@ -49,7 +49,7 @@
# define _AVR_IOXXX_H_ "iom128.h" # define _AVR_IOXXX_H_ "iom128.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */
@@ -794,9 +794,9 @@
#define WDP1 1 #define WDP1 1
#define WDP0 0 #define WDP0 0
/* /*
The ADHSM bit has been removed from all documentation, The ADHSM bit has been removed from all documentation,
as being not needed at all since the comparator has proven as being not needed at all since the comparator has proven
to be fast enough even without feeding it more power. to be fast enough even without feeding it more power.
*/ */
@@ -966,7 +966,7 @@
#define PINA5 5 #define PINA5 5
#define PINA4 4 #define PINA4 4
#define PINA3 3 #define PINA3 3
#define PINA2 2 #define PINA2 2
#define PINA1 1 #define PINA1 1
#define PINA0 0 #define PINA0 0
@@ -996,7 +996,7 @@
#define PINB5 5 #define PINB5 5
#define PINB4 4 #define PINB4 4
#define PINB3 3 #define PINB3 3
#define PINB2 2 #define PINB2 2
#define PINB1 1 #define PINB1 1
#define PINB0 0 #define PINB0 0
@@ -1026,7 +1026,7 @@
#define PINC5 5 #define PINC5 5
#define PINC4 4 #define PINC4 4
#define PINC3 3 #define PINC3 3
#define PINC2 2 #define PINC2 2
#define PINC1 1 #define PINC1 1
#define PINC0 0 #define PINC0 0
@@ -1056,7 +1056,7 @@
#define PIND5 5 #define PIND5 5
#define PIND4 4 #define PIND4 4
#define PIND3 3 #define PIND3 3
#define PIND2 2 #define PIND2 2
#define PIND1 1 #define PIND1 1
#define PIND0 0 #define PIND0 0
@@ -1086,7 +1086,7 @@
#define PINE5 5 #define PINE5 5
#define PINE4 4 #define PINE4 4
#define PINE3 3 #define PINE3 3
#define PINE2 2 #define PINE2 2
#define PINE1 1 #define PINE1 1
#define PINE0 0 #define PINE0 0
@@ -1116,7 +1116,7 @@
#define PINF5 5 #define PINF5 5
#define PINF4 4 #define PINF4 4
#define PINF3 3 #define PINF3 3
#define PINF2 2 #define PINF2 2
#define PINF1 1 #define PINF1 1
#define PINF0 0 #define PINF0 0
@@ -1137,7 +1137,7 @@
/* Port G Input Pins - PING */ /* Port G Input Pins - PING */
#define PING4 4 #define PING4 4
#define PING3 3 #define PING3 3
#define PING2 2 #define PING2 2
#define PING1 1 #define PING1 1
#define PING0 0 #define PING0 0
@@ -1191,7 +1191,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2005 Anatoly Sokolov /* Copyright (c) 2005 Anatoly Sokolov
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
@@ -82,7 +82,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2005 Anatoly Sokolov /* Copyright (c) 2005 Anatoly Sokolov
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
@@ -82,7 +82,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -5219,7 +5219,7 @@ struct __reg_TST_RX_LENGTH {
/* Lock Bits */ /* Lock Bits */
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "iom16.h" # define _AVR_IOXXX_H_ "iom16.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* Registers and associated bit numbers */ /* Registers and associated bit numbers */
@@ -369,9 +369,9 @@
#define COM1A0 6 #define COM1A0 6
#define COM1A1 7 #define COM1A1 7
/* /*
The ADHSM bit has been removed from all documentation, The ADHSM bit has been removed from all documentation,
as being not needed at all since the comparator has proven as being not needed at all since the comparator has proven
to be fast enough even without feeding it more power. to be fast enough even without feeding it more power.
*/ */
@@ -602,7 +602,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "iom161.h" # define _AVR_IOXXX_H_ "iom161.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */
@@ -661,7 +661,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "iom162.h" # define _AVR_IOXXX_H_ "iom162.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* Memory mapped I/O registers */ /* Memory mapped I/O registers */
@@ -164,7 +164,7 @@
#define UCSR1A _SFR_IO8(0x02) /* USART 1 Control and Status Register A */ #define UCSR1A _SFR_IO8(0x02) /* USART 1 Control and Status Register A */
#define UCSR1B _SFR_IO8(0x01) /* USART 1 Control and Status Register B */ #define UCSR1B _SFR_IO8(0x01) /* USART 1 Control and Status Register B */
#define UBRR1L _SFR_IO8(0x00) /* USART 0 Baud Rate Register High Byte */ #define UBRR1L _SFR_IO8(0x00) /* USART 0 Baud Rate Register High Byte */
/* Interrupt vectors (byte addresses) */ /* Interrupt vectors (byte addresses) */
@@ -457,7 +457,7 @@
/* SPMCR bit definitions */ /* SPMCR bit definitions */
#define SPMIE 7 #define SPMIE 7
#define RWWSB 6 #define RWWSB 6
@@ -940,7 +940,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "iom163.h" # define _AVR_IOXXX_H_ "iom163.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* I/O registers */ /* I/O registers */
@@ -627,7 +627,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -82,7 +82,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
#endif /* _AVR_IOM164_H_ */ #endif /* _AVR_IOM164_H_ */

View File

@@ -45,7 +45,7 @@
# define _AVR_IOXXX_H_ "iom165.h" # define _AVR_IOXXX_H_ "iom165.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* Registers and associated bit numbers */ /* Registers and associated bit numbers */
@@ -808,7 +808,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

View File

@@ -46,7 +46,7 @@
# define _AVR_IOXXX_H_ "iom165p.h" # define _AVR_IOXXX_H_ "iom165p.h"
#else #else
# error "Attempt to include more than one <avr/ioXXX.h> file." # error "Attempt to include more than one <avr/ioXXX.h> file."
#endif #endif
/* Registers and associated bit numbers */ /* Registers and associated bit numbers */
@@ -810,7 +810,7 @@
/* Lock Bits */ /* Lock Bits */
#define __LOCK_BITS_EXIST #define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST #define __BOOT_LOCK_BITS_1_EXIST
/* Signature */ /* Signature */

Some files were not shown because too many files have changed in this diff Show More