package com.uart.hal.service
public class UARTHALService
{
private static UARTHALService UartHalService;
//实现了UARTHALService类的singleton模式
public static UARTHALService getInstance()
{
if(UartHalService == null)
return new UARTHALService();
else
return UartHalService;
}
public int uartRead(int fd, byte[] buf,int len)
{
return uart_read_Java(fd, buf, len);
}
public int uartWrite(int fd, byte[] data)
{
return uart_write_Java(fd, data);
}
}
czcc
最新推荐文章于 2022-02-25 22:41:09 发布