Project

General

Profile

Revision 264

added files

View differences:

proj/include/hltp.h
1
#ifndef HLTP_H_INCLUDED
2
#define HLTP_H_INCLUDED
3

  
4
int hltp_send_string(int port, const char *p);
5

  
6
#endif //HLTP_H_INCLUDED
0 7

  
proj/include/nctp.h
1
#ifndef NCTP_H_INCLUDED
2
#define NCTP_H_INCLUDED
3

  
4
#include "uart.h"
5

  
6
int nctp_get_char_poll   (int base_addr, uint8_t *p);
7
int nctp_send_char_poll  (int base_addr, uint8_t  c);
8

  
9
/**
10
 * @brief Send stuff to COM #port.
11
 * @param   port    Port to send message to
12
 * @param   num     Number of pairs of address/numbytes to send
13
 */
14
int nctp_send(int port, size_t num, uint8_t* ptr[], size_t sz[]);
15

  
16
#endif //NCTP_H_INCLUDED
0 17

  
proj/src/hltp.c
1
#include <lcom/lcf.h>
2

  
3
#include "hltp.h"
4

  
5
#include "nctp.h"
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);
11
}
0 12

  

Also available in: Unified diff