etrobocon2018 feat.KatLab  770af34cce41ae9c30c41303275e1add2daae0c3 (with uncommitted changes)
 全て クラス 名前空間 ファイル 関数 変数 列挙型 列挙値 フレンド マクロ定義 ページ
関数
spp_master_test_api.c ファイル
#include "ev3api.h"
#include "platform_interface_layer.h"
#include "syssvc/serial.h"
#include <stdlib.h>
#include <string.h>
spp_master_test_api.c の依存先関係図:

[ソースコード]

関数

void spp_master_test_connect_ev3 (const uint8_t addr[6], const char *pin)
 
bool_t spp_master_test_is_connected ()
 
FILE * spp_master_test_open_file ()
 

関数詳解

void spp_master_test_connect_ev3 ( const uint8_t  addr[6],
const char *  pin 
)

spp_master_test_api.c8 行目に定義があります。

8  {
9  spp_master_test_connect(addr, pin); // TODO: check return value
10 }
bool_t spp_master_test_is_connected ( )

spp_master_test_api.c12 行目に定義があります。

12  {
13  T_SERIAL_RPOR rpor;
14  ER ercd = serial_ref_por(SIO_PORT_SPP_MASTER_TEST, &rpor);
15  return ercd == E_OK;
16 }
FILE* spp_master_test_open_file ( )

spp_master_test_api.c18 行目に定義があります。

18  {
19  int fd = SIO_PORT_SPP_MASTER_TEST_FILENO;
20 
21  FILE *fp = fdopen(fd, "a+");
22  if (fp != NULL)
23  setbuf(fp, NULL); /* IMPORTANT! */
24  else assert(false); //API_ERROR("fdopen() failed, fd: %d.", fd);
25  return fp;
26 }