MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / write_resp

Method write_resp

kernel/cellos/src/sys_uart.cpp:1954–1971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1952
1953template <bool UseScBuffer>
1954void vuart_av_thread::write_resp(u32 cid, u32 status, const void *data,
1955 u16 data_size) {
1956 const ps3av_pkt_reply_hdr pkt_hdr = {PS3AV_VERSION, data_size + 8U,
1957 cid | PS3AV_REPLY_BIT, status};
1958
1959 if (status != PS3AV_STATUS_SUCCESS) {
1960 sys_uart.error("Packet failed cid=0x%08x status=0x%02x", cid, status);
1961 }
1962
1963 temp_buf &buf = UseScBuffer ? temp_rx_sc_buf : temp_rx_buf;
1964 const u32 total_size = sizeof(pkt_hdr) + data_size;
1965
1966 if (buf.crnt_size + total_size <= sizeof(buf.buf)) {
1967 memcpy(&buf.buf[buf.crnt_size], &pkt_hdr, sizeof(pkt_hdr));
1968 memcpy(&buf.buf[buf.crnt_size + sizeof(pkt_hdr)], data, data_size);
1969 buf.crnt_size += total_size;
1970 }
1971}
1972
1973std::shared_ptr<ps3av_cmd> vuart_av_thread::get_cmd(u32 cid) {
1974 switch (cid) {

Callers 15

executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected