Project

General

Profile

Revision 269

small chat working with DR.mk

View differences:

hltp.c
4 4

  
5 5
#include "nctp.h"
6 6

  
7
int hltp_send_string(int port, const char *p){
8
    uint8_t* ptr[] = {p};
9
    size_t    sz[] = {strlen(p)};
10
    return nctp_send(port, 1, ptr, sz);
7
int hltp_send_string(int base_addr, const char *p){
8
    uint8_t* ptr[1]; ptr[0] = (uint8_t*)p;
9
    size_t    sz[1]; sz[0] = strlen(p)+1;
10
    return nctp_send(base_addr, 1, ptr, sz);
11 11
}
12 12

  
13
int hltp_get_string(int port, char *p){
14
    return nctp_get(port, p);
13
int hltp_get_string(int base_addr, char **p){
14
    return nctp_get(base_addr, (uint8_t**)p);
15 15
}

Also available in: Unified diff