ARPDAS_QNX6 1.0
|
#include <sys/siginfo.h>
Go to the source code of this file.
Classes | |
struct | subbus_mread_req |
Defines | |
#define | SB_PCICC 1 |
#define | SB_PCICCSIC 2 |
#define | SB_SYSCON 3 |
#define | SB_SYSCON104 4 |
#define | SB_SYSCONDACS 5 |
#define | SBF_SIC 1 |
#define | SBF_LG_RAM 2 |
#define | SBF_HW_CNTS 4 |
#define | SBF_WD 8 |
#define | SBF_SET_FAIL 0x10 |
#define | SBF_READ_FAIL 0x20 |
#define | SBF_READ_SW 0x40 |
#define | SBF_NVRAM 0x80 |
#define | SBF_CMDSTROBE 0x100 |
#define | write_subbus(x, y) write_ack(x,y) |
#define | subbus_name get_subbus_name() |
#define | sbrw(x) read_subbus(x) |
#define | sbwr(x, y) write_ack(x,y) |
#define | sbwra(x, y) write_ack(x,y) |
Functions | |
int | load_subbus (void) |
unsigned short | read_subbus (unsigned short addr) |
int | write_ack (unsigned short addr, unsigned short data) |
int | read_ack (unsigned short addr, unsigned short *data) |
subbus_mread_req * | pack_mread_request (int n_reads, const char *req) |
subbus_mread_req * | pack_mread_requests (unsigned int addr,...) |
int | mread_subbus (subbus_mread_req *req, unsigned short *data) |
int | set_cmdenbl (int value) |
int | set_cmdstrobe (int value) |
unsigned short | read_switches (void) |
int | set_failure (unsigned short value) |
unsigned short | read_failure (void) |
int | tick_sic (void) |
int | disarm_sic (void) |
char * | get_subbus_name (void) |
int | cache_write (unsigned short addr, unsigned short data) |
unsigned short | cache_read (unsigned short addr) |
unsigned short | sbrb (unsigned short addr) |
unsigned short | sbrba (unsigned short addr) |
unsigned int | sbrwa (unsigned short addr) |
int | subbus_int_attach (char *cardID, unsigned short address, unsigned short region, struct sigevent *event) |
int | subbus_int_detach (char *cardID) |
int | subbus_quit (void) |
Variables | |
unsigned short | subbus_version |
unsigned short | subbus_features |
unsigned short | subbus_subfunction |
subbus.h defines the interface to the subbus resident library Before calling the subbus routines, you must first call load_subbus(). This returns the subfunction of the resident subbus library or 0 if none is installed.
Definition in file subbus.h.
#define SB_SYSCON104 4 |
Definition at line 23 of file subbus.h.
Referenced by int_init(), and int_reset().
#define sbwra | ( | x, | |
y | |||
) | write_ack(x,y) |
Definition at line 72 of file subbus.h.
Referenced by int_attach(), and int_detach().
unsigned short cache_read | ( | unsigned short | addr | ) |
Definition at line 137 of file subbus.c.
References subbusd_rep_t::data, subbusd_req_data1::data, nl_error, SBC_READCACHE, SBRT_US, SBS_ACK, SBS_NOACK, send_to_subbusd(), and subbusd_rep_t::value.
int cache_write | ( | unsigned short | addr, |
unsigned short | data | ||
) |
Definition at line 219 of file subbus.c.
References subbusd_req_data0::address, subbusd_req_data0::data, nl_error, SBC_WRITECACHE, SBRT_NONE, SBS_ACK, SBS_NOACK, and send_to_subbusd().
int disarm_sic | ( | void | ) |
If system controller is associated with a watchdog timer that can reboot the system, this command disables that timer.
Definition at line 350 of file subbus.c.
References SBC_DISARM, SBRT_NONE, SC_DISARM, and send_to_subbusd().
Referenced by incoming_sbreq().
char* get_subbus_name | ( | void | ) |
Returns the hardware name string as originally retrieved from subbusd during load_subbus().
Definition at line 107 of file subbus.c.
References local_subbus_name, nl_error, and sb_fd.
int load_subbus | ( | void | ) |
Initializes communications with subbusd driver. Returns library subfunction on success, zero on failure.
Definition at line 75 of file subbus.c.
References subbusd_rep_t::capabilities, subbusd_rep_t::data, subbusd_cap_t::features, subbusd_req_hdr_t::iohdr, local_subbus_name, subbusd_cap_t::name, nl_error, sb_fd, sb_iov, SB_KW, subbusd_req_hdr_t::sb_kw, SBC_GETCAPS, SBRT_CAP, SBS_OK, send_to_subbusd(), subbus_features, SUBBUS_NAME_MAX, subbus_subfunction, SUBBUSD_MGRID, and subbusd_cap_t::subfunc.
int mread_subbus | ( | subbus_mread_req * | req, |
unsigned short * | data | ||
) |
Passes the raw command directly to the subbus driver and parses the return string for a multi-read. Up to n_read values will be written into the array pointed to by the data argument.
Definition at line 392 of file subbus.c.
References subbusd_rep_t::data, subbusd_rep_t::mread, subbusd_mread_t::n_reads, subbus_mread_req::n_reads, nl_assert, subbus_mread_req::req_len, subbusd_mread_t::rvals, SBC_MREAD, SBRT_MREAD, and send_to_subbusd().
subbus_mread_req* pack_mread_request | ( | int | n_reads, |
const char * | req | ||
) |
Takes a multi-read <addr-list> string and invokes pack_mread().
Definition at line 509 of file subbus.c.
References nl_error, and pack_mread().
subbus_mread_req* pack_mread_requests | ( | unsigned int | addr, |
... | |||
) |
Takes a zero-terminated list of addresses, generates the appropriate text request string and invokes pack_mread().
Definition at line 440 of file subbus.c.
References n_reads, nl_assert, nl_error, and pack_mread().
int read_ack | ( | unsigned short | addr, |
unsigned short * | data | ||
) |
Definition at line 116 of file subbus.c.
References subbusd_rep_t::data, subbusd_req_data1::data, nl_error, SBC_READACK, SBRT_US, SBS_ACK, SBS_NOACK, SC_SB_LOWA, SC_SB_LOWB, SC_SB_LOWC, send_to_subbusd(), subbusd_rep_t::value, and WAIT_COUNT.
Referenced by incoming_sbreq(), read_subbus(), sbrb(), sbrba(), and sbrwa().
unsigned short read_failure | ( | void | ) |
The value reported represents the current state of the indicator lights. As noted in read_switches(), the least significant bit is associated the the main "fail light" located in the cockpit. This light can be lit via set_failure() or the system controller's two minute timeout circuit. In either case, read_failure() will report the actual state of the light.
Definition at line 327 of file subbus.c.
References read_special(), SBC_READFAIL, and SC_LAMP.
Referenced by incoming_sbreq().
unsigned short read_subbus | ( | unsigned short | addr | ) |
Definition at line 156 of file subbus.c.
References read_ack().
Referenced by sbrb().
unsigned short read_switches | ( | void | ) |
Reads the positions of a dedicated set of system mode switches, usually located on a control panel on the instrument.
Definition at line 314 of file subbus.c.
References read_special(), SBC_READSW, and SC_SWITCHES.
Referenced by incoming_sbreq().
unsigned short sbrb | ( | unsigned short | addr | ) |
Definition at line 162 of file subbus.c.
References read_ack(), and read_subbus().
Referenced by service_expint().
unsigned short sbrba | ( | unsigned short | addr | ) |
Definition at line 171 of file subbus.c.
References read_ack().
unsigned int sbrwa | ( | unsigned short | addr | ) |
Definition at line 181 of file subbus.c.
References read_ack().
int set_cmdenbl | ( | int | val | ) |
Set cmdenbl value.
don't need to serialize access to cmdenbl, since it's I/O port mapped.
Definition at line 263 of file subbus.c.
References SBC_SETCMDENBL, SC_CMDENBL, and send_CSF().
Referenced by incoming_sbreq().
int set_cmdstrobe | ( | int | value | ) |
Function did not exist at all before version 3.10, so programs intending to use this function should verify that the resident library version is at least 3.10. The feature word can also be checked for support, and that is consistent back to previous versions.
value | 1 turns on cmdstrobe, 0 turns off cmdstrobe |
Function to set cmdstrobe value.
val | non-zero value asserts cmdstrobe. |
Function did not exist at all before version 3.10, so programs intending to use this function should verify that the resident library version is at least 3.10. The feature word can also be checked for support, and that is consistent back to previous versions.
Definition at line 276 of file subbus.c.
References SBC_SETCMDSTRB, SC_SB_LOWC, SC_SB_LOWCTRL, and send_CSF().
Referenced by incoming_sbreq().
int set_failure | ( | unsigned short | value | ) |
Sets the value of a dedicated set of indicator lights, usually located on a control panel on the instrument and/or in the cockpit of the aircraft. For each bit of the input argument, a non-zero value indicates the associated light should be on.
By convention, the least significant bit is associated with the main "fail light" located in the cockpit on aircraft instruments, indicating that the instrument is not acquiring data.. This light (and the associated bit value on readback) will also be set by the system controller's two minute timeout circuit.
value | Binary-encoded light settings. |
Definition at line 295 of file subbus.c.
References SBC_SETFAIL, SC_LAMP, and send_CSF().
Referenced by incoming_sbreq().
int subbus_int_attach | ( | char * | cardID, |
unsigned short | address, | ||
unsigned short | region, | ||
struct sigevent * | event | ||
) |
Definition at line 354 of file subbus.c.
References subbusd_req_data2::address, subbusd_req_data2::cardID, subbusd_req_data2::event, nl_assert, subbusd_req_data2::region, SBC_INTATT, SBRT_US, and send_to_subbusd().
int subbus_int_detach | ( | char * | cardID | ) |
Definition at line 365 of file subbus.c.
References subbusd_req_data3::cardID, nl_assert, SBC_INTDET, SBRT_US, and send_to_subbusd().
int subbus_quit | ( | void | ) |
int tick_sic | ( | void | ) |
Historically, tick_sic() has been associated with two timers. The first is a 2-second timeout that can reboot the system. The second is a 2-minute timeout that lights the main fail light indicating that the instrument is not acquiring data.
It is unclear whether the new syscon_usb will support the reboot timer or rely on a motherboard-specific watchdog timer.
Definition at line 341 of file subbus.c.
References SBC_TICK, SBRT_NONE, SC_TICK, and send_to_subbusd().
Referenced by incoming_sbreq().
int write_ack | ( | unsigned short | addr, |
unsigned short | data | ||
) |
Definition at line 195 of file subbus.c.
References subbusd_req_data0::address, subbusd_req_data0::data, nl_error, SBC_WRITEACK, SBRT_NONE, SBS_ACK, SBS_NOACK, SC_SB_LOWA, SC_SB_LOWB, SC_SB_LOWC, send_to_subbusd(), and WAIT_COUNT.
Referenced by incoming_sbreq().
unsigned short subbus_features |
Definition at line 24 of file subbus.c.
Referenced by load_subbus().
unsigned short subbus_subfunction |
Definition at line 23 of file subbus.c.
Referenced by int_init(), int_reset(), and load_subbus().
unsigned short subbus_version |