Go to the documentation of this file.
9 #include "../kernel/event.h"
10 #include "../sf/service.h"
169 Result uartPortSessionOpenPort(
UartPortSession* s,
bool *out,
UartPort port,
u32 baud_rate,
UartFlowControlMode flow_control_mode,
u32 device_variation,
bool is_invert_tx,
bool is_invert_rx,
bool is_invert_rts,
bool is_invert_cts,
void* send_buffer,
u64 send_buffer_length,
void* receive_buffer,
u64 receive_buffer_length);
189 Result uartPortSessionOpenPortForDev(
UartPortSession* s,
bool *out,
UartPortForDev port,
u32 baud_rate,
UartFlowControlMode flow_control_mode,
u32 device_variation,
bool is_invert_tx,
bool is_invert_rx,
bool is_invert_rts,
bool is_invert_cts,
void* send_buffer,
u64 send_buffer_length,
void* receive_buffer,
u64 receive_buffer_length);
int64_t s64
64-bit signed integer.
Definition: types.h:28
Result uartIsSupportedDeviceVariationForDev(UartPortForDev port, u32 device_variation, bool *out)
IsSupportedDeviceVariationForDev.
UartPortForDev
UartPortForDev.
Definition: uart.h:21
@ UartFlowControlMode_None
None.
Definition: uart.h:29
Result uartPortSessionSend(UartPortSession *s, const void *in_data, size_t size, u64 *out)
Send.
Result uartInitialize(void)
Initialize uart.
Kernel-mode event structure.
Definition: event.h:13
Result uartPortSessionReceive(UartPortSession *s, void *out_data, size_t size, u64 *out)
Receive.
Result uartCreatePortSession(UartPortSession *s)
Creates an UartPortSession.
Result uartPortSessionBindPortEvent(UartPortSession *s, UartPortEventType port_event_type, s64 threshold, bool *out, Event *out_event)
BindPortEvent.
Result uartIsSupportedPortEventForDev(UartPortForDev port, UartPortEventType port_event_type, bool *out)
IsSupportedPortEventForDev.
@ UartPortEventType_SendBufferReady
SendBufferReady.
Definition: uart.h:36
Result uartPortSessionOpenPortForDev(UartPortSession *s, bool *out, UartPortForDev port, u32 baud_rate, UartFlowControlMode flow_control_mode, u32 device_variation, bool is_invert_tx, bool is_invert_rx, bool is_invert_rts, bool is_invert_cts, void *send_buffer, u64 send_buffer_length, void *receive_buffer, u64 receive_buffer_length)
OpenPortForDev.
void uartPortSessionClose(UartPortSession *s)
Close an UartPortSession.
UartPortEventType
PortEventType.
Definition: uart.h:34
@ UartPortForDev_JoyConR
Joy-Con(R)
Definition: uart.h:22
@ UartPortEventType_ReceiveEnd
ReceiveEnd.
Definition: uart.h:38
Result uartPortSessionGetWritableLength(UartPortSession *s, u64 *out)
GetWritableLength.
@ UartPortEventType_ReceiveBufferReady
ReceiveBufferReady.
Definition: uart.h:37
@ UartPort_Bluetooth
Bluetooth.
Definition: uart.h:14
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
@ UartPort_JoyConR
Joy-Con(R)
Definition: uart.h:15
Result uartIsSupportedDeviceVariation(UartPort port, u32 device_variation, bool *out)
IsSupportedDeviceVariation.
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
PortSession.
Definition: uart.h:42
@ UartPortForDev_JoyConL
Joy-Con(L)
Definition: uart.h:23
u32 Result
Function error code result type.
Definition: types.h:44
@ UartFlowControlMode_Hardware
Hardware.
Definition: uart.h:30
Result uartPortSessionGetReadableLength(UartPortSession *s, u64 *out)
GetReadableLength.
Service * uartGetServiceSession(void)
Gets the Service object for the actual uart service session.
Result uartHasPortForDev(UartPortForDev port, bool *out)
HasPortForDev.
Result uartIsSupportedPortEvent(UartPort port, UartPortEventType port_event_type, bool *out)
IsSupportedPortEvent.
Result uartIsSupportedBaudRateForDev(UartPortForDev port, u32 baud_rate, bool *out)
IsSupportedBaudRateForDev.
void uartExit(void)
Exit uart.
@ UartPortEventType_SendBufferEmpty
SendBufferEmpty.
Definition: uart.h:35
Result uartIsSupportedFlowControlModeForDev(UartPortForDev port, UartFlowControlMode flow_control_mode, bool *out)
IsSupportedFlowControlModeForDev.
Service object structure.
Definition: service.h:13
@ UartPort_JoyConL
Joy-Con(L)
Definition: uart.h:16
Result uartHasPort(UartPort port, bool *out)
HasPort.
Result uartIsSupportedBaudRate(UartPort port, u32 baud_rate, bool *out)
IsSupportedBaudRate.
Result uartPortSessionOpenPort(UartPortSession *s, bool *out, UartPort port, u32 baud_rate, UartFlowControlMode flow_control_mode, u32 device_variation, bool is_invert_tx, bool is_invert_rx, bool is_invert_rts, bool is_invert_cts, void *send_buffer, u64 send_buffer_length, void *receive_buffer, u64 receive_buffer_length)
OpenPort.
UartPort
UartPort.
Definition: uart.h:13
@ UartPort_MCU
MCU.
Definition: uart.h:17
UartFlowControlMode
FlowControlMode.
Definition: uart.h:28
Result uartPortSessionUnbindPortEvent(UartPortSession *s, UartPortEventType port_event_type, bool *out)
UnbindPortEvent.
Result uartIsSupportedFlowControlMode(UartPort port, UartFlowControlMode flow_control_mode, bool *out)
IsSupportedFlowControlMode.
@ UartPortForDev_Bluetooth
Bluetooth.
Definition: uart.h:24
Service s
IPortSession.
Definition: uart.h:43