Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
47
Issues
47
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
612ae4eb
Commit
612ae4eb
authored
Jan 03, 2012
by
Alessandro Rubini
Committed by
Aurelio Colosimo
Jan 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arch-spec: make it compile (but not link yet)
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
fe3ed177
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
4 deletions
+7
-4
stdint.h
arch-spec/include/stdint.h
+2
-0
main-loop.c
arch-spec/main-loop.c
+1
-2
spec-socket.c
arch-spec/spec-socket.c
+2
-1
spec-startup.c
arch-spec/spec-startup.c
+2
-1
No files found.
arch-spec/include/stdint.h
View file @
612ae4eb
...
@@ -9,8 +9,10 @@
...
@@ -9,8 +9,10 @@
typedef
unsigned
char
uint8_t
;
typedef
unsigned
char
uint8_t
;
typedef
unsigned
short
uint16_t
;
typedef
unsigned
short
uint16_t
;
typedef
unsigned
long
uint32_t
;
typedef
unsigned
long
uint32_t
;
typedef
unsigned
long
long
uint64_t
;
typedef
signed
char
int8_t
;
typedef
signed
char
int8_t
;
typedef
signed
short
int16_t
;
typedef
signed
short
int16_t
;
typedef
signed
long
int32_t
;
typedef
signed
long
int32_t
;
typedef
signed
long
long
int64_t
;
#endif
/* __ARCH_SPEC_STDINT_H__ */
#endif
/* __ARCH_SPEC_STDINT_H__ */
arch-spec/main-loop.c
View file @
612ae4eb
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
* This is the main loop for the Spec board
* This is the main loop for the Spec board
*/
*/
#include <pptp/pptp.h>
#include <pptp/pptp.h>
#include <pptp/diag.h>
#include "spec.h"
#include "spec.h"
void
spec_main_loop
(
struct
pp_instance
*
ppi
)
void
spec_main_loop
(
struct
pp_instance
*
ppi
)
...
@@ -42,8 +43,6 @@ void spec_main_loop(struct pp_instance *ppi)
...
@@ -42,8 +43,6 @@ void spec_main_loop(struct pp_instance *ppi)
pp_printf
(
" %02x"
,
packet
[
j
]);
pp_printf
(
" %02x"
,
packet
[
j
]);
pp_printf
(
"
\n
"
);
pp_printf
(
"
\n
"
);
}
}
if
(
i
<
sizeof
(
struct
pp_packet
)
/* or minimum of all pckts */
)
continue
;
/* Warning: PP_PROTO_NR is endian-agnostic by design */
/* Warning: PP_PROTO_NR is endian-agnostic by design */
if
(((
struct
spec_ethhdr
*
)
packet
)
->
h_proto
!=
if
(((
struct
spec_ethhdr
*
)
packet
)
->
h_proto
!=
htons
(
PP_PROTO_NR
))
htons
(
PP_PROTO_NR
))
...
...
arch-spec/spec-socket.c
View file @
612ae4eb
...
@@ -16,7 +16,8 @@ int spec_open_ch(struct pp_instance *ppi)
...
@@ -16,7 +16,8 @@ int spec_open_ch(struct pp_instance *ppi)
ep_enable
(
1
,
1
);
ep_enable
(
1
,
1
);
minic_init
();
minic_init
();
memcpy
(
ppi
->
ch
.
addr
,
fake_addr
,
6
);
memcpy
(
ppi
->
net_path
->
gen_ch
.
addr
,
fake_addr
,
6
);
memcpy
(
ppi
->
net_path
->
evt_ch
.
addr
,
fake_addr
,
6
);
return
0
;
return
0
;
}
}
...
...
arch-spec/spec-startup.c
View file @
612ae4eb
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later
* Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later
*/
*/
#include <pptp/pptp.h>
#include <pptp/pptp.h>
#include <pptp/diag.h>
#include "spec.h"
#include "spec.h"
#include "include/gpio.h"
#include "include/gpio.h"
...
@@ -27,7 +28,7 @@ void pptp_main(void)
...
@@ -27,7 +28,7 @@ void pptp_main(void)
pp_diag_error
(
ppi
,
spec_errno
);
pp_diag_error
(
ppi
,
spec_errno
);
pp_diag_fatal
(
ppi
,
"open_ch"
,
""
);
pp_diag_fatal
(
ppi
,
"open_ch"
,
""
);
}
}
pp_open_instance
(
ppi
);
pp_open_instance
(
ppi
,
0
/* no opts */
);
spec_main_loop
(
ppi
);
spec_main_loop
(
ppi
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment