Working on the new UDP protocol
This commit is contained in:
parent
5a77d3a0e0
commit
809f8ac2e0
5 changed files with 206 additions and 247 deletions
18
host/net.h
Normal file
18
host/net.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef __NET_H__
|
||||
#define __NET_H__
|
||||
|
||||
#include "config.h"
|
||||
|
||||
typedef struct {
|
||||
uint8_t r, g, b;
|
||||
} rgb_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t magic, seq;
|
||||
uint16_t width, height;
|
||||
rgb_t data[DISPLAY_WIDTH*DISPLAY_HEIGHT];
|
||||
} ml_packet_t;
|
||||
|
||||
#define UDP_BUF_SIZE sizeof(ml_packet_t)
|
||||
|
||||
#endif//__NET_H__
|
||||
Loading…
Add table
Add a link
Reference in a new issue