diff --git a/Source/Core/Common/Arm64Emitter.cpp b/Source/Core/Common/Arm64Emitter.cpp index 8d71016f7e..3c7bc8e2c3 100644 --- a/Source/Core/Common/Arm64Emitter.cpp +++ b/Source/Core/Common/Arm64Emitter.cpp @@ -32,7 +32,7 @@ namespace Arm64Gen namespace { // For ADD/SUB -std::optional> IsImmArithmetic(uint64_t input) +std::optional> IsImmArithmetic(u64 input) { if (input < 4096) return std::pair{static_cast(input), false}; @@ -3094,7 +3094,7 @@ void ARM64FloatEmitter::EmitScalar3Source(bool isDouble, ARM64Reg Rd, ARM64Reg R } // Scalar floating point immediate -void ARM64FloatEmitter::FMOV(ARM64Reg Rd, uint8_t imm8) +void ARM64FloatEmitter::FMOV(ARM64Reg Rd, u8 imm8) { EmitScalarImm(0, 0, 0, 0, Rd, imm8); } diff --git a/Source/Core/Common/Arm64Emitter.h b/Source/Core/Common/Arm64Emitter.h index 134f9b64cc..26b2518575 100644 --- a/Source/Core/Common/Arm64Emitter.h +++ b/Source/Core/Common/Arm64Emitter.h @@ -1271,7 +1271,7 @@ public: void FNMSUB(ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm, ARM64Reg Ra); // Scalar floating point immediate - void FMOV(ARM64Reg Rd, uint8_t imm8); + void FMOV(ARM64Reg Rd, u8 imm8); // Vector void ADD(u8 size, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm); diff --git a/Source/Core/Common/ArmCPUDetect.cpp b/Source/Core/Common/ArmCPUDetect.cpp index 68a29caa45..aaf2999d1c 100644 --- a/Source/Core/Common/ArmCPUDetect.cpp +++ b/Source/Core/Common/ArmCPUDetect.cpp @@ -303,7 +303,7 @@ void CPUInfo::Detect() int mib[2]; size_t len; char hwmodel[256]; - uint64_t isar0; + u64 isar0; mib[0] = CTL_HW; mib[1] = HW_MODEL; diff --git a/Source/Core/Common/Assembler/CaseInsensitiveDict.h b/Source/Core/Common/Assembler/CaseInsensitiveDict.h index 5dffbb6335..4049d47647 100644 --- a/Source/Core/Common/Assembler/CaseInsensitiveDict.h +++ b/Source/Core/Common/Assembler/CaseInsensitiveDict.h @@ -11,6 +11,8 @@ #include #include +#include "Common/CommonTypes.h" + namespace Common::GekkoAssembler::detail { // Hacky implementation of a case insensitive alphanumeric trie supporting extended entries @@ -39,12 +41,12 @@ public: return nullptr; } static constexpr size_t NUM_CONNS = 36 + sizeof...(ExtraMatches); - static constexpr uint32_t INVALID_CONN = static_cast(-1); + static constexpr u32 INVALID_CONN = static_cast(-1); private: struct TrieEntry { - std::array _conns; + std::array _conns; std::optional _val; TrieEntry() { _conns.fill(INVALID_CONN); } @@ -113,7 +115,7 @@ private: { break; } - last_e->_conns[idx] = static_cast(m_entry_pool.size()); + last_e->_conns[idx] = static_cast(m_entry_pool.size()); last_e = &m_entry_pool.emplace_back(); } } diff --git a/Source/Core/Common/BlockingLoop.h b/Source/Core/Common/BlockingLoop.h index 472a84b1f6..e0bb6f4406 100644 --- a/Source/Core/Common/BlockingLoop.h +++ b/Source/Core/Common/BlockingLoop.h @@ -9,6 +9,7 @@ #include "Common/Event.h" #include "Common/Flag.h" +#include "Common/CommonTypes.h" namespace Common { @@ -123,7 +124,7 @@ public: // The optional timeout parameter is a timeout for how periodically the payload should be called. // Use timeout = 0 to run without a timeout at all. template - void Run(F payload, int64_t timeout = 0) + void Run(F payload, s64 timeout = 0) { // Asserts that Prepare is called at least once before we enter the loop. // But a good implementation should call this before already. diff --git a/Source/Core/Common/CompatPatches.cpp b/Source/Core/Common/CompatPatches.cpp index aeb509f4ab..7802181f64 100644 --- a/Source/Core/Common/CompatPatches.cpp +++ b/Source/Core/Common/CompatPatches.cpp @@ -81,7 +81,7 @@ public: directories = pe->OptionalHeader.DataDirectory; } template - T GetRva(uint32_t rva) + T GetRva(u32 rva) { return reinterpret_cast(base + rva); } diff --git a/Source/Core/Core/AchievementManager.cpp b/Source/Core/Core/AchievementManager.cpp index a40f4aaeb5..f1ab7cf0b0 100644 --- a/Source/Core/Core/AchievementManager.cpp +++ b/Source/Core/Core/AchievementManager.cpp @@ -740,7 +740,7 @@ void* AchievementManager::FilereaderOpenByVolume(const char* path_utf8) return state.release(); } -void AchievementManager::FilereaderSeek(void* file_handle, int64_t offset, int origin) +void AchievementManager::FilereaderSeek(void* file_handle, s64 offset, int origin) { switch (origin) { @@ -756,7 +756,7 @@ void AchievementManager::FilereaderSeek(void* file_handle, int64_t offset, int o } } -int64_t AchievementManager::FilereaderTell(void* file_handle) +s64 AchievementManager::FilereaderTell(void* file_handle) { return static_cast(file_handle)->position; } diff --git a/Source/Core/Core/AchievementManager.h b/Source/Core/Core/AchievementManager.h index aad6ba9561..ae38203db7 100644 --- a/Source/Core/Core/AchievementManager.h +++ b/Source/Core/Core/AchievementManager.h @@ -171,7 +171,7 @@ private: struct FilereaderState { - int64_t position = 0; + s64 position = 0; std::unique_ptr volume; }; @@ -179,8 +179,8 @@ private: static void* FilereaderOpenByFilepath(const char* path_utf8); static void* FilereaderOpenByVolume(const char* path_utf8); - static void FilereaderSeek(void* file_handle, int64_t offset, int origin); - static int64_t FilereaderTell(void* file_handle); + static void FilereaderSeek(void* file_handle, s64 offset, int origin); + static s64 FilereaderTell(void* file_handle); static size_t FilereaderRead(void* file_handle, void* buffer, size_t requested_bytes); static void FilereaderClose(void* file_handle); diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceModem.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceModem.cpp index fbe75e7a84..a80d0b2e04 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceModem.cpp +++ b/Source/Core/Core/HW/EXI/EXI_DeviceModem.cpp @@ -88,7 +88,7 @@ void CEXIModem::ImmWrite(u32 data, u32 size) } else { // Write device register - u8 reg_num = static_cast((m_transfer_descriptor >> 24) & 0x1F); + u8 reg_num = static_cast((m_transfer_descriptor >> 24) & 0x1F); bool should_update_interrupts = false; for (; size && reg_num < m_regs.size(); size--) { @@ -154,7 +154,7 @@ u32 CEXIModem::ImmRead(u32 size) else { // Read device register - const u8 reg_num = static_cast((m_transfer_descriptor >> 24) & 0x1F); + const u8 reg_num = static_cast((m_transfer_descriptor >> 24) & 0x1F); if (reg_num == 0) { return 0x02020000; // Device ID (modem) diff --git a/Source/Core/Core/Host.h b/Source/Core/Core/Host.h index 5fc1fc1ee9..7a1c4cba0c 100644 --- a/Source/Core/Core/Host.h +++ b/Source/Core/Core/Host.h @@ -74,8 +74,8 @@ bool Host_UpdateDiscordPresenceRaw(const std::string& details = {}, const std::s const std::string& large_image_text = {}, const std::string& small_image_key = {}, const std::string& small_image_text = {}, - const int64_t start_timestamp = 0, - const int64_t end_timestamp = 0, const int party_size = 0, + const s64 start_timestamp = 0, + const s64 end_timestamp = 0, const int party_size = 0, const int party_max = 0); std::unique_ptr Host_CreateGBAHost(std::weak_ptr core); diff --git a/Source/Core/Core/IOS/DolphinDevice.cpp b/Source/Core/Core/IOS/DolphinDevice.cpp index 944bec41b2..5d1489816d 100644 --- a/Source/Core/Core/IOS/DolphinDevice.cpp +++ b/Source/Core/Core/IOS/DolphinDevice.cpp @@ -189,8 +189,8 @@ IPCReply SetDiscordPresence(Core::System& system, const IOCtlVRequest& request) std::string small_image_text = memory.GetString(request.in_vectors[5].address, request.in_vectors[5].size); - int64_t start_timestamp = memory.Read_U64(request.in_vectors[6].address); - int64_t end_timestamp = memory.Read_U64(request.in_vectors[7].address); + s64 start_timestamp = memory.Read_U64(request.in_vectors[6].address); + s64 end_timestamp = memory.Read_U64(request.in_vectors[7].address); int party_size = memory.Read_U32(request.in_vectors[8].address); int party_max = memory.Read_U32(request.in_vectors[9].address); diff --git a/Source/Core/Core/IOS/FS/HostBackend/File.cpp b/Source/Core/Core/IOS/FS/HostBackend/File.cpp index 17e42e0aec..f335fd2b52 100644 --- a/Source/Core/Core/IOS/FS/HostBackend/File.cpp +++ b/Source/Core/Core/IOS/FS/HostBackend/File.cpp @@ -163,7 +163,7 @@ Result HostFileSystem::WriteBytesToFile(Fd fd, const u8* ptr, u32 count) return count; } -Result HostFileSystem::SeekFile(Fd fd, std::uint32_t offset, SeekMode mode) +Result HostFileSystem::SeekFile(Fd fd, u32 offset, SeekMode mode) { Handle* handle = GetHandleFromFd(fd); if (!handle || !handle->host_file->IsOpen()) diff --git a/Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp b/Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp index e3a6a660ed..da8a45f662 100644 --- a/Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp +++ b/Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp @@ -459,7 +459,7 @@ bool BluetoothRealDevice::SendHCIStoreLinkKeyCommand() if (m_link_keys.empty()) return false; - // The HCI command field is limited to uint8_t, and libusb to uint16_t. + // The HCI command field is limited to u8, and libusb to u16. const u8 payload_size = static_cast(sizeof(hci_write_stored_link_key_cp)) + (sizeof(bdaddr_t) + sizeof(linkkey_t)) * static_cast(m_link_keys.size()); diff --git a/Source/Core/Core/IOS/USB/Bluetooth/hci.h b/Source/Core/Core/IOS/USB/Bluetooth/hci.h index c42a42aae7..02cdcffdec 100644 --- a/Source/Core/Core/IOS/USB/Bluetooth/hci.h +++ b/Source/Core/Core/IOS/USB/Bluetooth/hci.h @@ -428,9 +428,9 @@ constexpr bdaddr_t BDADDR_ANY{}; /* HCI command packet header */ typedef struct { - // uint8_t type; /* MUST be 0x01 */ - uint16_t opcode; /* OpCode */ - uint8_t length; /* parameter(s) length in bytes */ + // u8 type; /* MUST be 0x01 */ + u16 opcode; /* OpCode */ + u8 length; /* parameter(s) length in bytes */ } hci_cmd_hdr_t; #define HCI_CMD_PKT 0x01 @@ -439,9 +439,9 @@ typedef struct /* ACL data packet header */ typedef struct { - // uint8_t type; /* MUST be 0x02 */ - uint16_t con_handle; /* connection handle + PB + BC flags */ - uint16_t length; /* payload length in bytes */ + // u8 type; /* MUST be 0x02 */ + u16 con_handle; /* connection handle + PB + BC flags */ + u16 length; /* payload length in bytes */ } hci_acldata_hdr_t; #define HCI_ACL_DATA_PKT 0x02 @@ -450,9 +450,9 @@ typedef struct /* SCO data packet header */ typedef struct { - // uint8_t type; /* MUST be 0x03 */ - uint16_t con_handle; /* connection handle + reserved bits */ - uint8_t length; /* payload length in bytes */ + // u8 type; /* MUST be 0x03 */ + u16 con_handle; /* connection handle + reserved bits */ + u8 length; /* payload length in bytes */ } hci_scodata_hdr_t; #define HCI_SCO_DATA_PKT 0x03 @@ -461,9 +461,9 @@ typedef struct /* HCI event packet header */ typedef struct { - // uint8_t type; /* MUST be 0x04 */ - uint8_t event; /* event */ - uint8_t length; /* parameter(s) length in bytes */ + // u8 type; /* MUST be 0x04 */ + u8 event; /* event */ + u8 length; /* parameter(s) length in bytes */ } hci_event_hdr_t; #define HCI_EVENT_PKT 0x04 @@ -472,7 +472,7 @@ typedef struct /* HCI status return parameter */ typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ } hci_status_rp; /************************************************************************** @@ -487,9 +487,9 @@ typedef struct #define HCI_CMD_INQUIRY 0x0401 typedef struct { - uint8_t lap[HCI_LAP_SIZE]; /* LAP */ - uint8_t inquiry_length; /* (N x 1.28) sec */ - uint8_t num_responses; /* Max. # of responses */ + u8 lap[HCI_LAP_SIZE]; /* LAP */ + u8 inquiry_length; /* (N x 1.28) sec */ + u8 num_responses; /* Max. # of responses */ } hci_inquiry_cp; /* No return parameter(s) */ @@ -502,11 +502,11 @@ typedef hci_status_rp hci_inquiry_cancel_rp; #define HCI_CMD_PERIODIC_INQUIRY 0x0403 typedef struct { - uint16_t max_period_length; /* Max. and min. amount of time */ - uint16_t min_period_length; /* between consecutive inquiries */ - uint8_t lap[HCI_LAP_SIZE]; /* LAP */ - uint8_t inquiry_length; /* (inquiry_length * 1.28) sec */ - uint8_t num_responses; /* Max. # of responses */ + u16 max_period_length; /* Max. and min. amount of time */ + u16 min_period_length; /* between consecutive inquiries */ + u8 lap[HCI_LAP_SIZE]; /* LAP */ + u8 inquiry_length; /* (inquiry_length * 1.28) sec */ + u8 num_responses; /* Max. # of responses */ } hci_periodic_inquiry_cp; typedef hci_status_rp hci_periodic_inquiry_rp; @@ -521,11 +521,11 @@ typedef hci_status_rp hci_exit_periodic_inquiry_rp; typedef struct { bdaddr_t bdaddr; /* destination address */ - uint16_t pkt_type; /* packet type */ - uint8_t page_scan_rep_mode; /* page scan repetition mode */ - uint8_t page_scan_mode; /* reserved - set to 0x00 */ - uint16_t clock_offset; /* clock offset */ - uint8_t accept_role_switch; /* accept role switch? 0x00 == No */ + u16 pkt_type; /* packet type */ + u8 page_scan_rep_mode; /* page scan repetition mode */ + u8 page_scan_mode; /* reserved - set to 0x00 */ + u16 clock_offset; /* clock offset */ + u8 accept_role_switch; /* accept role switch? 0x00 == No */ } hci_create_con_cp; /* No return parameter(s) */ @@ -533,8 +533,8 @@ typedef struct #define HCI_CMD_DISCONNECT 0x0406 typedef struct { - uint16_t con_handle; /* connection handle */ - uint8_t reason; /* reason to disconnect */ + u16 con_handle; /* connection handle */ + u8 reason; /* reason to disconnect */ } hci_discon_cp; /* No return parameter(s) */ @@ -543,8 +543,8 @@ typedef struct #define HCI_CMD_ADD_SCO_CON 0x0407 typedef struct { - uint16_t con_handle; /* connection handle */ - uint16_t pkt_type; /* packet type */ + u16 con_handle; /* connection handle */ + u16 pkt_type; /* packet type */ } hci_add_sco_con_cp; /* No return parameter(s) */ @@ -557,7 +557,7 @@ typedef struct typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* destination address */ } hci_create_con_cancel_rp; @@ -566,7 +566,7 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* address of unit to be connected */ - uint8_t role; /* connection role */ + u8 role; /* connection role */ } hci_accept_con_cp; /* No return parameter(s) */ @@ -575,7 +575,7 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote address */ - uint8_t reason; /* reason to reject */ + u8 reason; /* reason to reject */ } hci_reject_con_cp; /* No return parameter(s) */ @@ -584,12 +584,12 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote address */ - uint8_t key[HCI_KEY_SIZE]; /* key */ + u8 key[HCI_KEY_SIZE]; /* key */ } hci_link_key_rep_cp; typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* unit address */ } hci_link_key_rep_rp; @@ -602,7 +602,7 @@ typedef struct typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* unit address */ } hci_link_key_neg_rep_rp; @@ -611,13 +611,13 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote address */ - uint8_t pin_size; /* pin code length (in bytes) */ - uint8_t pin[HCI_PIN_SIZE]; /* pin code */ + u8 pin_size; /* pin code length (in bytes) */ + u8 pin[HCI_PIN_SIZE]; /* pin code */ } hci_pin_code_rep_cp; typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* unit address */ } hci_pin_code_rep_rp; @@ -630,7 +630,7 @@ typedef struct typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* unit address */ } hci_pin_code_neg_rep_rp; @@ -638,8 +638,8 @@ typedef struct #define HCI_CMD_CHANGE_CON_PACKET_TYPE 0x040F typedef struct { - uint16_t con_handle; /* connection handle */ - uint16_t pkt_type; /* packet type */ + u16 con_handle; /* connection handle */ + u16 pkt_type; /* packet type */ } hci_change_con_pkt_type_cp; /* No return parameter(s) */ @@ -647,7 +647,7 @@ typedef struct #define HCI_CMD_AUTH_REQ 0x0411 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_auth_req_cp; /* No return parameter(s) */ @@ -655,8 +655,8 @@ typedef struct #define HCI_CMD_SET_CON_ENCRYPTION 0x0413 typedef struct { - uint16_t con_handle; /* connection handle */ - uint8_t encryption_enable; /* 0x00 - disable, 0x01 - enable */ + u16 con_handle; /* connection handle */ + u8 encryption_enable; /* 0x00 - disable, 0x01 - enable */ } hci_set_con_encryption_cp; /* No return parameter(s) */ @@ -664,7 +664,7 @@ typedef struct #define HCI_CMD_CHANGE_CON_LINK_KEY 0x0415 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_change_con_link_key_cp; /* No return parameter(s) */ @@ -672,7 +672,7 @@ typedef struct #define HCI_CMD_MASTER_LINK_KEY 0x0417 typedef struct { - uint8_t key_flag; /* key flag */ + u8 key_flag; /* key flag */ } hci_master_link_key_cp; /* No return parameter(s) */ @@ -681,9 +681,9 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote address */ - uint8_t page_scan_rep_mode; /* page scan repetition mode */ - uint8_t page_scan_mode; /* page scan mode */ - uint16_t clock_offset; /* clock offset */ + u8 page_scan_rep_mode; /* page scan repetition mode */ + u8 page_scan_mode; /* page scan mode */ + u16 clock_offset; /* clock offset */ } hci_remote_name_req_cp; /* No return parameter(s) */ @@ -696,7 +696,7 @@ typedef struct typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* remote address */ } hci_remote_name_req_cancel_rp; @@ -704,7 +704,7 @@ typedef struct #define HCI_CMD_READ_REMOTE_FEATURES 0x041B typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_read_remote_features_cp; /* No return parameter(s) */ @@ -712,8 +712,8 @@ typedef struct #define HCI_CMD_READ_REMOTE_EXTENDED_FEATURES 0x041C typedef struct { - uint16_t con_handle; /* connection handle */ - uint8_t page; /* page number */ + u16 con_handle; /* connection handle */ + u8 page; /* page number */ } hci_read_remote_extended_features_cp; /* No return parameter(s) */ @@ -721,7 +721,7 @@ typedef struct #define HCI_CMD_READ_REMOTE_VER_INFO 0x041D typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_read_remote_ver_info_cp; /* No return parameter(s) */ @@ -729,7 +729,7 @@ typedef struct #define HCI_CMD_READ_CLOCK_OFFSET 0x041F typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_read_clock_offset_cp; /* No return parameter(s) */ @@ -737,28 +737,28 @@ typedef struct #define HCI_CMD_READ_LMP_HANDLE 0x0420 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_read_lmp_handle_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint8_t lmp_handle; /* LMP handle */ - uint32_t reserved; /* reserved */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u8 lmp_handle; /* LMP handle */ + u32 reserved; /* reserved */ } hci_read_lmp_handle_rp; #define HCI_OCF_SETUP_SCO_CON 0x0028 #define HCI_CMD_SETUP_SCO_CON 0x0428 typedef struct { - uint16_t con_handle; /* connection handle */ - uint32_t tx_bandwidth; /* transmit bandwidth */ - uint32_t rx_bandwidth; /* receive bandwidth */ - uint16_t latency; /* maximum latency */ - uint16_t voice; /* voice setting */ - uint8_t rt_effort; /* retransmission effort */ - uint16_t pkt_type; /* packet types */ + u16 con_handle; /* connection handle */ + u32 tx_bandwidth; /* transmit bandwidth */ + u32 rx_bandwidth; /* receive bandwidth */ + u16 latency; /* maximum latency */ + u16 voice; /* voice setting */ + u8 rt_effort; /* retransmission effort */ + u16 pkt_type; /* packet types */ } hci_setup_sco_con_cp; /* No return parameter(s) */ @@ -767,12 +767,12 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote address */ - uint32_t tx_bandwidth; /* transmit bandwidth */ - uint32_t rx_bandwidth; /* receive bandwidth */ - uint16_t latency; /* maximum latency */ - uint16_t content; /* voice setting */ - uint8_t rt_effort; /* retransmission effort */ - uint16_t pkt_type; /* packet types */ + u32 tx_bandwidth; /* transmit bandwidth */ + u32 rx_bandwidth; /* receive bandwidth */ + u16 latency; /* maximum latency */ + u16 content; /* voice setting */ + u8 rt_effort; /* retransmission effort */ + u16 pkt_type; /* packet types */ } hci_accept_sco_con_req_cp; /* No return parameter(s) */ @@ -781,7 +781,7 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote address */ - uint8_t reason; /* reject error code */ + u8 reason; /* reject error code */ } hci_reject_sco_con_req_cp; /* No return parameter(s) */ @@ -790,14 +790,14 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote address */ - uint8_t io_cap; /* IO capability */ - uint8_t oob_data; /* OOB data present */ - uint8_t auth_req; /* auth requirements */ + u8 io_cap; /* IO capability */ + u8 oob_data; /* OOB data present */ + u8 auth_req; /* auth requirements */ } hci_io_capability_rep_cp; typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* remote address */ } hci_io_capability_rep_rp; @@ -810,7 +810,7 @@ typedef struct typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* remote address */ } hci_user_confirm_rep_rp; @@ -823,7 +823,7 @@ typedef struct typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* remote address */ } hci_user_confirm_neg_rep_rp; @@ -832,12 +832,12 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote address */ - uint32_t value; /* 000000 - 999999 */ + u32 value; /* 000000 - 999999 */ } hci_user_passkey_rep_cp; typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* remote address */ } hci_user_passkey_rep_rp; @@ -850,7 +850,7 @@ typedef struct typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* remote address */ } hci_user_passkey_neg_rep_rp; @@ -859,13 +859,13 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote address */ - uint8_t c[16]; /* pairing hash */ - uint8_t r[16]; /* pairing randomizer */ + u8 c[16]; /* pairing hash */ + u8 r[16]; /* pairing randomizer */ } hci_user_oob_data_rep_cp; typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* remote address */ } hci_user_oob_data_rep_rp; @@ -878,7 +878,7 @@ typedef struct typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* remote address */ } hci_user_oob_data_neg_rep_rp; @@ -887,12 +887,12 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote address */ - uint8_t reason; /* error code */ + u8 reason; /* error code */ } hci_io_capability_neg_rep_cp; typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* remote address */ } hci_io_capability_neg_rep_rp; @@ -908,9 +908,9 @@ typedef struct #define HCI_CMD_HOLD_MODE 0x0801 typedef struct { - uint16_t con_handle; /* connection handle */ - uint16_t max_interval; /* (max_interval * 0.625) msec */ - uint16_t min_interval; /* (max_interval * 0.625) msec */ + u16 con_handle; /* connection handle */ + u16 max_interval; /* (max_interval * 0.625) msec */ + u16 min_interval; /* (max_interval * 0.625) msec */ } hci_hold_mode_cp; /* No return parameter(s) */ @@ -918,11 +918,11 @@ typedef struct #define HCI_CMD_SNIFF_MODE 0x0803 typedef struct { - uint16_t con_handle; /* connection handle */ - uint16_t max_interval; /* (max_interval * 0.625) msec */ - uint16_t min_interval; /* (max_interval * 0.625) msec */ - uint16_t attempt; /* (2 * attempt - 1) * 0.625 msec */ - uint16_t timeout; /* (2 * attempt - 1) * 0.625 msec */ + u16 con_handle; /* connection handle */ + u16 max_interval; /* (max_interval * 0.625) msec */ + u16 min_interval; /* (max_interval * 0.625) msec */ + u16 attempt; /* (2 * attempt - 1) * 0.625 msec */ + u16 timeout; /* (2 * attempt - 1) * 0.625 msec */ } hci_sniff_mode_cp; /* No return parameter(s) */ @@ -930,7 +930,7 @@ typedef struct #define HCI_CMD_EXIT_SNIFF_MODE 0x0804 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_exit_sniff_mode_cp; /* No return parameter(s) */ @@ -938,9 +938,9 @@ typedef struct #define HCI_CMD_PARK_MODE 0x0805 typedef struct { - uint16_t con_handle; /* connection handle */ - uint16_t max_interval; /* (max_interval * 0.625) msec */ - uint16_t min_interval; /* (max_interval * 0.625) msec */ + u16 con_handle; /* connection handle */ + u16 max_interval; /* (max_interval * 0.625) msec */ + u16 min_interval; /* (max_interval * 0.625) msec */ } hci_park_mode_cp; /* No return parameter(s) */ @@ -948,7 +948,7 @@ typedef struct #define HCI_CMD_EXIT_PARK_MODE 0x0806 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_exit_park_mode_cp; /* No return parameter(s) */ @@ -956,13 +956,13 @@ typedef struct #define HCI_CMD_QOS_SETUP 0x0807 typedef struct { - uint16_t con_handle; /* connection handle */ - uint8_t flags; /* reserved for future use */ - uint8_t service_type; /* service type */ - uint32_t token_rate; /* bytes per second */ - uint32_t peak_bandwidth; /* bytes per second */ - uint32_t latency; /* microseconds */ - uint32_t delay_variation; /* microseconds */ + u16 con_handle; /* connection handle */ + u8 flags; /* reserved for future use */ + u8 service_type; /* service type */ + u32 token_rate; /* bytes per second */ + u32 peak_bandwidth; /* bytes per second */ + u32 latency; /* microseconds */ + u32 delay_variation; /* microseconds */ } hci_qos_setup_cp; /* No return parameter(s) */ @@ -970,14 +970,14 @@ typedef struct #define HCI_CMD_ROLE_DISCOVERY 0x0809 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_role_discovery_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint8_t role; /* role for the connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u8 role; /* role for the connection handle */ } hci_role_discovery_rp; #define HCI_OCF_SWITCH_ROLE 0x000b @@ -985,7 +985,7 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote address */ - uint8_t role; /* new local role */ + u8 role; /* new local role */ } hci_switch_role_cp; /* No return parameter(s) */ @@ -993,28 +993,28 @@ typedef struct #define HCI_CMD_READ_LINK_POLICY_SETTINGS 0x080C typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_read_link_policy_settings_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint16_t settings; /* link policy settings */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u16 settings; /* link policy settings */ } hci_read_link_policy_settings_rp; #define HCI_OCF_WRITE_LINK_POLICY_SETTINGS 0x000d #define HCI_CMD_WRITE_LINK_POLICY_SETTINGS 0x080D typedef struct { - uint16_t con_handle; /* connection handle */ - uint16_t settings; /* link policy settings */ + u16 con_handle; /* connection handle */ + u16 settings; /* link policy settings */ } hci_write_link_policy_settings_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ } hci_write_link_policy_settings_rp; #define HCI_OCF_READ_DEFAULT_LINK_POLICY_SETTINGS 0x000e @@ -1022,15 +1022,15 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t settings; /* link policy settings */ + u8 status; /* 0x00 - success */ + u16 settings; /* link policy settings */ } hci_read_default_link_policy_settings_rp; #define HCI_OCF_WRITE_DEFAULT_LINK_POLICY_SETTINGS 0x000f #define HCI_CMD_WRITE_DEFAULT_LINK_POLICY_SETTINGS 0x080F typedef struct { - uint16_t settings; /* link policy settings */ + u16 settings; /* link policy settings */ } hci_write_default_link_policy_settings_cp; typedef hci_status_rp hci_write_default_link_policy_settings_rp; @@ -1039,14 +1039,14 @@ typedef hci_status_rp hci_write_default_link_policy_settings_rp; #define HCI_CMD_FLOW_SPECIFICATION 0x0810 typedef struct { - uint16_t con_handle; /* connection handle */ - uint8_t flags; /* reserved */ - uint8_t flow_direction; - uint8_t service_type; - uint32_t token_rate; - uint32_t token_bucket; - uint32_t peak_bandwidth; - uint32_t latency; + u16 con_handle; /* connection handle */ + u8 flags; /* reserved */ + u8 flow_direction; + u8 service_type; + u32 token_rate; + u32 token_bucket; + u32 peak_bandwidth; + u32 latency; } hci_flow_specification_cp; /* No return parameter(s) */ @@ -1054,16 +1054,16 @@ typedef struct #define HCI_CMD_SNIFF_SUBRATING 0x0810 typedef struct { - uint16_t con_handle; /* connection handle */ - uint16_t max_latency; - uint16_t max_timeout; /* max remote timeout */ - uint16_t min_timeout; /* min local timeout */ + u16 con_handle; /* connection handle */ + u16 max_latency; + u16 max_timeout; /* max remote timeout */ + u16 min_timeout; /* min local timeout */ } hci_sniff_subrating_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ } hci_sniff_subrating_rp; /************************************************************************** @@ -1078,7 +1078,7 @@ typedef struct #define HCI_CMD_SET_EVENT_MASK 0x0C01 typedef struct { - uint8_t event_mask[HCI_EVENT_MASK_SIZE]; /* event_mask */ + u8 event_mask[HCI_EVENT_MASK_SIZE]; /* event_mask */ } hci_set_event_mask_cp; typedef hci_status_rp hci_set_event_mask_rp; @@ -1092,10 +1092,10 @@ typedef hci_status_rp hci_reset_rp; #define HCI_CMD_SET_EVENT_FILTER 0x0C05 typedef struct { - uint8_t filter_type; /* filter type */ - uint8_t filter_condition_type; /* filter condition type */ + u8 filter_type; /* filter type */ + u8 filter_condition_type; /* filter condition type */ /* variable size condition - uint8_t condition[]; -- conditions */ + u8 condition[]; -- conditions */ } hci_set_event_filter_cp; typedef hci_status_rp hci_set_event_filter_rp; @@ -1104,13 +1104,13 @@ typedef hci_status_rp hci_set_event_filter_rp; #define HCI_CMD_FLUSH 0x0C08 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_flush_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ } hci_flush_rp; #define HCI_OCF_READ_PIN_TYPE 0x0009 @@ -1118,15 +1118,15 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t pin_type; /* PIN type */ + u8 status; /* 0x00 - success */ + u8 pin_type; /* PIN type */ } hci_read_pin_type_rp; #define HCI_OCF_WRITE_PIN_TYPE 0x000a #define HCI_CMD_WRITE_PIN_TYPE 0x0C0A typedef struct { - uint8_t pin_type; /* PIN type */ + u8 pin_type; /* PIN type */ } hci_write_pin_type_cp; typedef hci_status_rp hci_write_pin_type_rp; @@ -1141,30 +1141,30 @@ typedef hci_status_rp hci_create_new_unit_key_rp; typedef struct { bdaddr_t bdaddr; /* address */ - uint8_t read_all; /* read all keys? 0x01 - yes */ + u8 read_all; /* read all keys? 0x01 - yes */ } hci_read_stored_link_key_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t max_num_keys; /* Max. number of keys */ - uint16_t num_keys_read; /* Number of stored keys */ + u8 status; /* 0x00 - success */ + u16 max_num_keys; /* Max. number of keys */ + u16 num_keys_read; /* Number of stored keys */ } hci_read_stored_link_key_rp; #define HCI_OCF_WRITE_STORED_LINK_KEY 0x0011 #define HCI_CMD_WRITE_STORED_LINK_KEY 0x0C11 typedef struct { - uint8_t num_keys_write; /* # of keys to write */ + u8 num_keys_write; /* # of keys to write */ /* these are repeated "num_keys_write" times bdaddr_t bdaddr; --- remote address(es) - uint8_t key[HCI_KEY_SIZE]; --- key(s) */ + u8 key[HCI_KEY_SIZE]; --- key(s) */ } hci_write_stored_link_key_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t num_keys_written; /* # of keys successfully written */ + u8 status; /* 0x00 - success */ + u8 num_keys_written; /* # of keys successfully written */ } hci_write_stored_link_key_rp; #define HCI_OCF_DELETE_STORED_LINK_KEY 0x0012 @@ -1172,13 +1172,13 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* address */ - uint8_t delete_all; /* delete all keys? 0x01 - yes */ + u8 delete_all; /* delete all keys? 0x01 - yes */ } hci_delete_stored_link_key_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t num_keys_deleted; /* Number of keys deleted */ + u8 status; /* 0x00 - success */ + u16 num_keys_deleted; /* Number of keys deleted */ } hci_delete_stored_link_key_rp; #define HCI_OCF_WRITE_LOCAL_NAME 0x0013 @@ -1195,7 +1195,7 @@ typedef hci_status_rp hci_write_local_name_rp; /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ char name[HCI_UNIT_NAME_SIZE]; /* unit name */ } hci_read_local_name_rp; @@ -1204,15 +1204,15 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t timeout; /* (timeout * 0.625) msec */ + u8 status; /* 0x00 - success */ + u16 timeout; /* (timeout * 0.625) msec */ } hci_read_con_accept_timeout_rp; #define HCI_OCF_WRITE_CON_ACCEPT_TIMEOUT 0x0016 #define HCI_CMD_WRITE_CON_ACCEPT_TIMEOUT 0x0C16 typedef struct { - uint16_t timeout; /* (timeout * 0.625) msec */ + u16 timeout; /* (timeout * 0.625) msec */ } hci_write_con_accept_timeout_cp; typedef hci_status_rp hci_write_con_accept_timeout_rp; @@ -1222,15 +1222,15 @@ typedef hci_status_rp hci_write_con_accept_timeout_rp; /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t timeout; /* (timeout * 0.625) msec */ + u8 status; /* 0x00 - success */ + u16 timeout; /* (timeout * 0.625) msec */ } hci_read_page_timeout_rp; #define HCI_OCF_WRITE_PAGE_TIMEOUT 0x0018 #define HCI_CMD_WRITE_PAGE_TIMEOUT 0x0C18 typedef struct { - uint16_t timeout; /* (timeout * 0.625) msec */ + u16 timeout; /* (timeout * 0.625) msec */ } hci_write_page_timeout_cp; typedef hci_status_rp hci_write_page_timeout_rp; @@ -1240,15 +1240,15 @@ typedef hci_status_rp hci_write_page_timeout_rp; /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t scan_enable; /* Scan enable */ + u8 status; /* 0x00 - success */ + u8 scan_enable; /* Scan enable */ } hci_read_scan_enable_rp; #define HCI_OCF_WRITE_SCAN_ENABLE 0x001a #define HCI_CMD_WRITE_SCAN_ENABLE 0x0C1A typedef struct { - uint8_t scan_enable; /* Scan enable */ + u8 scan_enable; /* Scan enable */ } hci_write_scan_enable_cp; typedef hci_status_rp hci_write_scan_enable_rp; @@ -1258,17 +1258,17 @@ typedef hci_status_rp hci_write_scan_enable_rp; /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t page_scan_interval; /* interval * 0.625 msec */ - uint16_t page_scan_window; /* window * 0.625 msec */ + u8 status; /* 0x00 - success */ + u16 page_scan_interval; /* interval * 0.625 msec */ + u16 page_scan_window; /* window * 0.625 msec */ } hci_read_page_scan_activity_rp; #define HCI_OCF_WRITE_PAGE_SCAN_ACTIVITY 0x001c #define HCI_CMD_WRITE_PAGE_SCAN_ACTIVITY 0x0C1C typedef struct { - uint16_t page_scan_interval; /* interval * 0.625 msec */ - uint16_t page_scan_window; /* window * 0.625 msec */ + u16 page_scan_interval; /* interval * 0.625 msec */ + u16 page_scan_window; /* window * 0.625 msec */ } hci_write_page_scan_activity_cp; typedef hci_status_rp hci_write_page_scan_activity_rp; @@ -1278,17 +1278,17 @@ typedef hci_status_rp hci_write_page_scan_activity_rp; /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t inquiry_scan_interval; /* interval * 0.625 msec */ - uint16_t inquiry_scan_window; /* window * 0.625 msec */ + u8 status; /* 0x00 - success */ + u16 inquiry_scan_interval; /* interval * 0.625 msec */ + u16 inquiry_scan_window; /* window * 0.625 msec */ } hci_read_inquiry_scan_activity_rp; #define HCI_OCF_WRITE_INQUIRY_SCAN_ACTIVITY 0x001e #define HCI_CMD_WRITE_INQUIRY_SCAN_ACTIVITY 0x0C1E typedef struct { - uint16_t inquiry_scan_interval; /* interval * 0.625 msec */ - uint16_t inquiry_scan_window; /* window * 0.625 msec */ + u16 inquiry_scan_interval; /* interval * 0.625 msec */ + u16 inquiry_scan_window; /* window * 0.625 msec */ } hci_write_inquiry_scan_activity_cp; typedef hci_status_rp hci_write_inquiry_scan_activity_rp; @@ -1298,15 +1298,15 @@ typedef hci_status_rp hci_write_inquiry_scan_activity_rp; /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t auth_enable; /* 0x01 - enabled */ + u8 status; /* 0x00 - success */ + u8 auth_enable; /* 0x01 - enabled */ } hci_read_auth_enable_rp; #define HCI_OCF_WRITE_AUTH_ENABLE 0x0020 #define HCI_CMD_WRITE_AUTH_ENABLE 0x0C20 typedef struct { - uint8_t auth_enable; /* 0x01 - enabled */ + u8 auth_enable; /* 0x01 - enabled */ } hci_write_auth_enable_cp; typedef hci_status_rp hci_write_auth_enable_rp; @@ -1317,8 +1317,8 @@ typedef hci_status_rp hci_write_auth_enable_rp; /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t encryption_mode; /* encryption mode */ + u8 status; /* 0x00 - success */ + u8 encryption_mode; /* encryption mode */ } hci_read_encryption_mode_rp; /* Write Encryption Mode is deprecated */ @@ -1326,7 +1326,7 @@ typedef struct #define HCI_CMD_WRITE_ENCRYPTION_MODE 0x0C22 typedef struct { - uint8_t encryption_mode; /* encryption mode */ + u8 encryption_mode; /* encryption mode */ } hci_write_encryption_mode_cp; typedef hci_status_rp hci_write_encryption_mode_rp; @@ -1336,15 +1336,15 @@ typedef hci_status_rp hci_write_encryption_mode_rp; /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t uclass[HCI_CLASS_SIZE]; /* unit class */ + u8 status; /* 0x00 - success */ + u8 uclass[HCI_CLASS_SIZE]; /* unit class */ } hci_read_unit_class_rp; #define HCI_OCF_WRITE_UNIT_CLASS 0x0024 #define HCI_CMD_WRITE_UNIT_CLASS 0x0C24 typedef struct { - uint8_t uclass[HCI_CLASS_SIZE]; /* unit class */ + u8 uclass[HCI_CLASS_SIZE]; /* unit class */ } hci_write_unit_class_cp; typedef hci_status_rp hci_write_unit_class_rp; @@ -1354,15 +1354,15 @@ typedef hci_status_rp hci_write_unit_class_rp; /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t settings; /* voice settings */ + u8 status; /* 0x00 - success */ + u16 settings; /* voice settings */ } hci_read_voice_setting_rp; #define HCI_OCF_WRITE_VOICE_SETTING 0x0026 #define HCI_CMD_WRITE_VOICE_SETTING 0x0C26 typedef struct { - uint16_t settings; /* voice settings */ + u16 settings; /* voice settings */ } hci_write_voice_setting_cp; typedef hci_status_rp hci_write_voice_setting_rp; @@ -1371,28 +1371,28 @@ typedef hci_status_rp hci_write_voice_setting_rp; #define HCI_CMD_READ_AUTO_FLUSH_TIMEOUT 0x0C27 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_read_auto_flush_timeout_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint16_t timeout; /* 0x00 - no flush, timeout * 0.625 msec */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u16 timeout; /* 0x00 - no flush, timeout * 0.625 msec */ } hci_read_auto_flush_timeout_rp; #define HCI_OCF_WRITE_AUTO_FLUSH_TIMEOUT 0x0028 #define HCI_CMD_WRITE_AUTO_FLUSH_TIMEOUT 0x0C28 typedef struct { - uint16_t con_handle; /* connection handle */ - uint16_t timeout; /* 0x00 - no flush, timeout * 0.625 msec */ + u16 con_handle; /* connection handle */ + u16 timeout; /* 0x00 - no flush, timeout * 0.625 msec */ } hci_write_auto_flush_timeout_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ } hci_write_auto_flush_timeout_rp; #define HCI_OCF_READ_NUM_BROADCAST_RETRANS 0x0029 @@ -1400,15 +1400,15 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t counter; /* number of broadcast retransmissions */ + u8 status; /* 0x00 - success */ + u8 counter; /* number of broadcast retransmissions */ } hci_read_num_broadcast_retrans_rp; #define HCI_OCF_WRITE_NUM_BROADCAST_RETRANS 0x002a #define HCI_CMD_WRITE_NUM_BROADCAST_RETRANS 0x0C2A typedef struct { - uint8_t counter; /* number of broadcast retransmissions */ + u8 counter; /* number of broadcast retransmissions */ } hci_write_num_broadcast_retrans_cp; typedef hci_status_rp hci_write_num_broadcast_retrans_rp; @@ -1418,15 +1418,15 @@ typedef hci_status_rp hci_write_num_broadcast_retrans_rp; /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t hold_mode_activity; /* Hold mode activities */ + u8 status; /* 0x00 - success */ + u8 hold_mode_activity; /* Hold mode activities */ } hci_read_hold_mode_activity_rp; #define HCI_OCF_WRITE_HOLD_MODE_ACTIVITY 0x002c #define HCI_CMD_WRITE_HOLD_MODE_ACTIVITY 0x0C2C typedef struct { - uint8_t hold_mode_activity; /* Hold mode activities */ + u8 hold_mode_activity; /* Hold mode activities */ } hci_write_hold_mode_activity_cp; typedef hci_status_rp hci_write_hold_mode_activity_rp; @@ -1435,14 +1435,14 @@ typedef hci_status_rp hci_write_hold_mode_activity_rp; #define HCI_CMD_READ_XMIT_LEVEL 0x0C2D typedef struct { - uint16_t con_handle; /* connection handle */ - uint8_t type; /* Xmit level type */ + u16 con_handle; /* connection handle */ + u8 type; /* Xmit level type */ } hci_read_xmit_level_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ char level; /* -30 <= level <= 30 dBm */ } hci_read_xmit_level_rp; @@ -1451,15 +1451,15 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t flow_control; /* 0x00 - disabled */ + u8 status; /* 0x00 - success */ + u8 flow_control; /* 0x00 - disabled */ } hci_read_sco_flow_control_rp; #define HCI_OCF_WRITE_SCO_FLOW_CONTROL 0x002f #define HCI_CMD_WRITE_SCO_FLOW_CONTROL 0x0C2F typedef struct { - uint8_t flow_control; /* 0x00 - disabled */ + u8 flow_control; /* 0x00 - disabled */ } hci_write_sco_flow_control_cp; typedef hci_status_rp hci_write_sco_flow_control_rp; @@ -1468,7 +1468,7 @@ typedef hci_status_rp hci_write_sco_flow_control_rp; #define HCI_CMD_HC2H_FLOW_CONTROL 0x0C31 typedef struct { - uint8_t hc2h_flow; /* Host Controller to Host flow control */ + u8 hc2h_flow; /* Host Controller to Host flow control */ } hci_hc2h_flow_control_cp; typedef hci_status_rp hci_h2hc_flow_control_rp; @@ -1477,10 +1477,10 @@ typedef hci_status_rp hci_h2hc_flow_control_rp; #define HCI_CMD_HOST_BUFFER_SIZE 0x0C33 typedef struct { - uint16_t max_acl_size; /* Max. size of ACL packet (bytes) */ - uint8_t max_sco_size; /* Max. size of SCO packet (bytes) */ - uint16_t num_acl_pkts; /* Max. number of ACL packets */ - uint16_t num_sco_pkts; /* Max. number of SCO packets */ + u16 max_acl_size; /* Max. size of ACL packet (bytes) */ + u8 max_sco_size; /* Max. size of SCO packet (bytes) */ + u16 num_acl_pkts; /* Max. number of ACL packets */ + u16 num_sco_pkts; /* Max. number of SCO packets */ } hci_host_buffer_size_cp; typedef hci_status_rp hci_host_buffer_size_rp; @@ -1489,10 +1489,10 @@ typedef hci_status_rp hci_host_buffer_size_rp; #define HCI_CMD_HOST_NUM_COMPL_PKTS 0x0C35 typedef struct { - uint8_t nu_con_handles; /* # of connection handles */ + u8 nu_con_handles; /* # of connection handles */ /* these are repeated "num_con_handles" times - uint16_t con_handle; --- connection handle(s) - uint16_t compl_pkts; --- # of completed packets */ + u16 con_handle; --- connection handle(s) + u16 compl_pkts; --- # of completed packets */ } hci_host_num_compl_pkts_cp; /* No return parameter(s) */ @@ -1500,28 +1500,28 @@ typedef struct #define HCI_CMD_READ_LINK_SUPERVISION_TIMEOUT 0x0C36 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_read_link_supervision_timeout_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint16_t timeout; /* Link supervision timeout * 0.625 msec */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u16 timeout; /* Link supervision timeout * 0.625 msec */ } hci_read_link_supervision_timeout_rp; #define HCI_OCF_WRITE_LINK_SUPERVISION_TIMEOUT 0x0037 #define HCI_CMD_WRITE_LINK_SUPERVISION_TIMEOUT 0x0C37 typedef struct { - uint16_t con_handle; /* connection handle */ - uint16_t timeout; /* Link supervision timeout * 0.625 msec */ + u16 con_handle; /* connection handle */ + u16 timeout; /* Link supervision timeout * 0.625 msec */ } hci_write_link_supervision_timeout_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ } hci_write_link_supervision_timeout_rp; #define HCI_OCF_READ_NUM_SUPPORTED_IAC 0x0038 @@ -1529,8 +1529,8 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t num_iac; /* # of supported IAC during scan */ + u8 status; /* 0x00 - success */ + u8 num_iac; /* # of supported IAC during scan */ } hci_read_num_supported_iac_rp; #define HCI_OCF_READ_IAC_LAP 0x0039 @@ -1538,19 +1538,19 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t num_iac; /* # of IAC */ + u8 status; /* 0x00 - success */ + u8 num_iac; /* # of IAC */ /* these are repeated "num_iac" times - uint8_t laps[HCI_LAP_SIZE]; --- LAPs */ + u8 laps[HCI_LAP_SIZE]; --- LAPs */ } hci_read_iac_lap_rp; #define HCI_OCF_WRITE_IAC_LAP 0x003a #define HCI_CMD_WRITE_IAC_LAP 0x0C3A typedef struct { - uint8_t num_iac; /* # of IAC */ + u8 num_iac; /* # of IAC */ /* these are repeated "num_iac" times - uint8_t laps[HCI_LAP_SIZE]; --- LAPs */ + u8 laps[HCI_LAP_SIZE]; --- LAPs */ } hci_write_iac_lap_cp; typedef hci_status_rp hci_write_iac_lap_rp; @@ -1561,8 +1561,8 @@ typedef hci_status_rp hci_write_iac_lap_rp; /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t page_scan_period_mode; /* Page scan period mode */ + u8 status; /* 0x00 - success */ + u8 page_scan_period_mode; /* Page scan period mode */ } hci_read_page_scan_period_rp; /* Write Page Scan Period Mode is deprecated */ @@ -1570,7 +1570,7 @@ typedef struct #define HCI_CMD_WRITE_PAGE_SCAN_PERIOD 0x0C3C typedef struct { - uint8_t page_scan_period_mode; /* Page scan period mode */ + u8 page_scan_period_mode; /* Page scan period mode */ } hci_write_page_scan_period_cp; typedef hci_status_rp hci_write_page_scan_period_rp; @@ -1581,8 +1581,8 @@ typedef hci_status_rp hci_write_page_scan_period_rp; /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t page_scan_mode; /* Page scan mode */ + u8 status; /* 0x00 - success */ + u8 page_scan_mode; /* Page scan mode */ } hci_read_page_scan_rp; /* Write Page Scan Mode is deprecated */ @@ -1590,7 +1590,7 @@ typedef struct #define HCI_CMD_WRITE_PAGE_SCAN 0x0C3E typedef struct { - uint8_t page_scan_mode; /* Page scan mode */ + u8 page_scan_mode; /* Page scan mode */ } hci_write_page_scan_cp; typedef hci_status_rp hci_write_page_scan_rp; @@ -1599,7 +1599,7 @@ typedef hci_status_rp hci_write_page_scan_rp; #define HCI_CMD_SET_AFH_CLASSIFICATION 0x0C3F typedef struct { - uint8_t classification[10]; + u8 classification[10]; } hci_set_afh_classification_cp; typedef hci_status_rp hci_set_afh_classification_rp; @@ -1610,15 +1610,15 @@ typedef hci_status_rp hci_set_afh_classification_rp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t type; /* inquiry scan type */ + u8 status; /* 0x00 - success */ + u8 type; /* inquiry scan type */ } hci_read_inquiry_scan_type_rp; #define HCI_OCF_WRITE_INQUIRY_SCAN_TYPE 0x0043 #define HCI_CMD_WRITE_INQUIRY_SCAN_TYPE 0x0C43 typedef struct { - uint8_t type; /* inquiry scan type */ + u8 type; /* inquiry scan type */ } hci_write_inquiry_scan_type_cp; typedef hci_status_rp hci_write_inquiry_scan_type_rp; @@ -1629,15 +1629,15 @@ typedef hci_status_rp hci_write_inquiry_scan_type_rp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t mode; /* inquiry mode */ + u8 status; /* 0x00 - success */ + u8 mode; /* inquiry mode */ } hci_read_inquiry_mode_rp; #define HCI_OCF_WRITE_INQUIRY_MODE 0x0045 #define HCI_CMD_WRITE_INQUIRY_MODE 0x0C45 typedef struct { - uint8_t mode; /* inquiry mode */ + u8 mode; /* inquiry mode */ } hci_write_inquiry_mode_cp; typedef hci_status_rp hci_write_inquiry_mode_rp; @@ -1648,15 +1648,15 @@ typedef hci_status_rp hci_write_inquiry_mode_rp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t type; /* page scan type */ + u8 status; /* 0x00 - success */ + u8 type; /* page scan type */ } hci_read_page_scan_type_rp; #define HCI_OCF_WRITE_PAGE_SCAN_TYPE 0x0047 #define HCI_CMD_WRITE_PAGE_SCAN_TYPE 0x0C47 typedef struct { - uint8_t type; /* page scan type */ + u8 type; /* page scan type */ } hci_write_page_scan_type_cp; typedef hci_status_rp hci_write_page_scan_type_rp; @@ -1667,15 +1667,15 @@ typedef hci_status_rp hci_write_page_scan_type_rp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t mode; /* assessment mode */ + u8 status; /* 0x00 - success */ + u8 mode; /* assessment mode */ } hci_read_afh_assessment_rp; #define HCI_OCF_WRITE_AFH_ASSESSMENT 0x0049 #define HCI_CMD_WRITE_AFH_ASSESSMENT 0x0C49 typedef struct { - uint8_t mode; /* assessment mode */ + u8 mode; /* assessment mode */ } hci_write_afh_assessment_cp; typedef hci_status_rp hci_write_afh_assessment_rp; @@ -1686,17 +1686,17 @@ typedef hci_status_rp hci_write_afh_assessment_rp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t fec_required; - uint8_t response[240]; + u8 status; /* 0x00 - success */ + u8 fec_required; + u8 response[240]; } hci_read_extended_inquiry_rsp_rp; #define HCI_OCF_WRITE_EXTENDED_INQUIRY_RSP 0x0052 #define HCI_CMD_WRITE_EXTENDED_INQUIRY_RSP 0x0C52 typedef struct { - uint8_t fec_required; - uint8_t response[240]; + u8 fec_required; + u8 response[240]; } hci_write_extended_inquiry_rsp_cp; typedef hci_status_rp hci_write_extended_inquiry_rsp_rp; @@ -1705,7 +1705,7 @@ typedef hci_status_rp hci_write_extended_inquiry_rsp_rp; #define HCI_CMD_REFRESH_ENCRYPTION_KEY 0x0C53 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_refresh_encryption_key_cp; typedef hci_status_rp hci_refresh_encryption_key_rp; @@ -1716,15 +1716,15 @@ typedef hci_status_rp hci_refresh_encryption_key_rp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t mode; /* simple pairing mode */ + u8 status; /* 0x00 - success */ + u8 mode; /* simple pairing mode */ } hci_read_simple_pairing_mode_rp; #define HCI_OCF_WRITE_SIMPLE_PAIRING_MODE 0x0056 #define HCI_CMD_WRITE_SIMPLE_PAIRING_MODE 0x0C56 typedef struct { - uint8_t mode; /* simple pairing mode */ + u8 mode; /* simple pairing mode */ } hci_write_simple_pairing_mode_cp; typedef hci_status_rp hci_write_simple_pairing_mode_rp; @@ -1735,9 +1735,9 @@ typedef hci_status_rp hci_write_simple_pairing_mode_rp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t c[16]; /* pairing hash */ - uint8_t r[16]; /* pairing randomizer */ + u8 status; /* 0x00 - success */ + u8 c[16]; /* pairing hash */ + u8 r[16]; /* pairing randomizer */ } hci_read_local_oob_data_rp; #define HCI_OCF_READ_INQUIRY_RSP_XMIT_POWER 0x0058 @@ -1746,15 +1746,15 @@ typedef struct typedef struct { - uint8_t status; /* 0x00 - success */ - int8_t power; /* TX power */ + u8 status; /* 0x00 - success */ + s8 power; /* TX power */ } hci_read_inquiry_rsp_xmit_power_rp; #define HCI_OCF_WRITE_INQUIRY_RSP_XMIT_POWER 0x0059 #define HCI_CMD_WRITE_INQUIRY_RSP_XMIT_POWER 0x0C59 typedef struct { - int8_t power; /* TX power */ + s8 power; /* TX power */ } hci_write_inquiry_rsp_xmit_power_cp; typedef hci_status_rp hci_write_inquiry_rsp_xmit_power_rp; @@ -1765,15 +1765,15 @@ typedef hci_status_rp hci_write_inquiry_rsp_xmit_power_rp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t reporting; /* erroneous data reporting */ + u8 status; /* 0x00 - success */ + u8 reporting; /* erroneous data reporting */ } hci_read_default_errdata_reporting_rp; #define HCI_OCF_WRITE_DEFAULT_ERRDATA_REPORTING 0x005B #define HCI_CMD_WRITE_DEFAULT_ERRDATA_REPORTING 0x0C5B typedef struct { - uint8_t reporting; /* erroneous data reporting */ + u8 reporting; /* erroneous data reporting */ } hci_write_default_errdata_reporting_cp; typedef hci_status_rp hci_write_default_errdata_reporting_rp; @@ -1782,8 +1782,8 @@ typedef hci_status_rp hci_write_default_errdata_reporting_rp; #define HCI_CMD_ENHANCED_FLUSH 0x0C5F typedef struct { - uint16_t con_handle; /* connection handle */ - uint8_t packet_type; + u16 con_handle; /* connection handle */ + u8 packet_type; } hci_enhanced_flush_cp; /* No response parameter(s) */ @@ -1793,12 +1793,12 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote address */ - uint8_t type; /* notification type */ + u8 type; /* notification type */ } hci_send_keypress_notification_cp; typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* remote address */ } hci_send_keypress_notification_rp; @@ -1815,12 +1815,12 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t hci_version; /* HCI version */ - uint16_t hci_revision; /* HCI revision */ - uint8_t lmp_version; /* LMP version */ - uint16_t manufacturer; /* Hardware manufacturer name */ - uint16_t lmp_subversion; /* LMP sub-version */ + u8 status; /* 0x00 - success */ + u8 hci_version; /* HCI version */ + u16 hci_revision; /* HCI revision */ + u8 lmp_version; /* LMP version */ + u16 manufacturer; /* Hardware manufacturer name */ + u16 lmp_subversion; /* LMP sub-version */ } hci_read_local_ver_rp; #define HCI_OCF_READ_LOCAL_COMMANDS 0x0002 @@ -1828,8 +1828,8 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t commands[HCI_COMMANDS_SIZE]; /* opcode bitmask */ + u8 status; /* 0x00 - success */ + u8 commands[HCI_COMMANDS_SIZE]; /* opcode bitmask */ } hci_read_local_commands_rp; #define HCI_OCF_READ_LOCAL_FEATURES 0x0003 @@ -1837,23 +1837,23 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t features[HCI_FEATURES_SIZE]; /* LMP features bitmsk*/ + u8 status; /* 0x00 - success */ + u8 features[HCI_FEATURES_SIZE]; /* LMP features bitmsk*/ } hci_read_local_features_rp; #define HCI_OCF_READ_LOCAL_EXTENDED_FEATURES 0x0004 #define HCI_CMD_READ_LOCAL_EXTENDED_FEATURES 0x1004 typedef struct { - uint8_t page; /* page number */ + u8 page; /* page number */ } hci_read_local_extended_features_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t page; /* page number */ - uint8_t max_page; /* maximum page number */ - uint8_t features[HCI_FEATURES_SIZE]; /* LMP features */ + u8 status; /* 0x00 - success */ + u8 page; /* page number */ + u8 max_page; /* maximum page number */ + u8 features[HCI_FEATURES_SIZE]; /* LMP features */ } hci_read_local_extended_features_rp; #define HCI_OCF_READ_BUFFER_SIZE 0x0005 @@ -1861,11 +1861,11 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t max_acl_size; /* Max. size of ACL packet (bytes) */ - uint8_t max_sco_size; /* Max. size of SCO packet (bytes) */ - uint16_t num_acl_pkts; /* Max. number of ACL packets */ - uint16_t num_sco_pkts; /* Max. number of SCO packets */ + u8 status; /* 0x00 - success */ + u16 max_acl_size; /* Max. size of ACL packet (bytes) */ + u8 max_sco_size; /* Max. size of SCO packet (bytes) */ + u16 num_acl_pkts; /* Max. number of ACL packets */ + u16 num_sco_pkts; /* Max. number of SCO packets */ } hci_read_buffer_size_rp; /* Read Country Code is deprecated */ @@ -1874,8 +1874,8 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t country_code; /* 0x00 - NAM, EUR, JP; 0x01 - France */ + u8 status; /* 0x00 - success */ + u8 country_code; /* 0x00 - NAM, EUR, JP; 0x01 - France */ } hci_read_country_code_rp; #define HCI_OCF_READ_BDADDR 0x0009 @@ -1883,7 +1883,7 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* unit address */ } hci_read_bdaddr_rp; @@ -1899,54 +1899,54 @@ typedef struct #define HCI_CMD_READ_FAILED_CONTACT_CNTR 0x1401 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_read_failed_contact_cntr_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint16_t counter; /* number of consecutive failed contacts */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u16 counter; /* number of consecutive failed contacts */ } hci_read_failed_contact_cntr_rp; #define HCI_OCF_RESET_FAILED_CONTACT_CNTR 0x0002 #define HCI_CMD_RESET_FAILED_CONTACT_CNTR 0x1402 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_reset_failed_contact_cntr_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ } hci_reset_failed_contact_cntr_rp; #define HCI_OCF_READ_LINK_QUALITY 0x0003 #define HCI_CMD_READ_LINK_QUALITY 0x1403 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_read_link_quality_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint8_t quality; /* higher value means better quality */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u8 quality; /* higher value means better quality */ } hci_read_link_quality_rp; #define HCI_OCF_READ_RSSI 0x0005 #define HCI_CMD_READ_RSSI 0x1405 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_read_rssi_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ char rssi; /* -127 <= rssi <= 127 dB */ } hci_read_rssi_rp; @@ -1954,31 +1954,31 @@ typedef struct #define HCI_CMD_READ_AFH_CHANNEL_MAP 0x1406 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_read_afh_channel_map_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint8_t mode; /* AFH mode */ - uint8_t map[10]; /* AFH Channel Map */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u8 mode; /* AFH mode */ + u8 map[10]; /* AFH Channel Map */ } hci_read_afh_channel_map_rp; #define HCI_OCF_READ_CLOCK 0x0007 #define HCI_CMD_READ_CLOCK 0x1407 typedef struct { - uint16_t con_handle; /* connection handle */ - uint8_t clock; /* which clock */ + u16 con_handle; /* connection handle */ + u8 clock; /* which clock */ } hci_read_clock_cp; typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint32_t clock; /* clock value */ - uint16_t accuracy; /* clock accuracy */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u32 clock; /* clock value */ + u16 accuracy; /* clock accuracy */ } hci_read_clock_rp; /************************************************************************** @@ -1994,15 +1994,15 @@ typedef struct /* No command parameter(s) */ typedef struct { - uint8_t status; /* 0x00 - success */ - uint8_t lbmode; /* loopback mode */ + u8 status; /* 0x00 - success */ + u8 lbmode; /* loopback mode */ } hci_read_loopback_mode_rp; #define HCI_OCF_WRITE_LOOPBACK_MODE 0x0002 #define HCI_CMD_WRITE_LOOPBACK_MODE 0x1802 typedef struct { - uint8_t lbmode; /* loopback mode */ + u8 lbmode; /* loopback mode */ } hci_write_loopback_mode_cp; typedef hci_status_rp hci_write_loopback_mode_rp; @@ -2016,7 +2016,7 @@ typedef hci_status_rp hci_enable_unit_under_test_rp; #define HCI_CMD_WRITE_SIMPLE_PAIRING_DEBUG_MODE 0x1804 typedef struct { - uint8_t mode; /* simple pairing debug mode */ + u8 mode; /* simple pairing debug mode */ } hci_write_simple_pairing_debug_mode_cp; typedef hci_status_rp hci_write_simple_pairing_debug_mode_rp; @@ -2048,63 +2048,63 @@ typedef hci_status_rp hci_write_simple_pairing_debug_mode_rp; #define HCI_EVENT_INQUIRY_COMPL 0x01 typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ } hci_inquiry_compl_ep; #define HCI_EVENT_INQUIRY_RESULT 0x02 typedef struct { - uint8_t num_responses; /* number of responses */ + u8 num_responses; /* number of responses */ /* hci_inquiry_response[num_responses] -- see below */ } hci_inquiry_result_ep; typedef struct { bdaddr_t bdaddr; /* unit address */ - uint8_t page_scan_rep_mode; /* page scan rep. mode */ - uint8_t page_scan_period_mode; /* page scan period mode */ - uint8_t page_scan_mode; /* page scan mode */ - uint8_t uclass[HCI_CLASS_SIZE]; /* unit class */ - uint16_t clock_offset; /* clock offset */ + u8 page_scan_rep_mode; /* page scan rep. mode */ + u8 page_scan_period_mode; /* page scan period mode */ + u8 page_scan_mode; /* page scan mode */ + u8 uclass[HCI_CLASS_SIZE]; /* unit class */ + u16 clock_offset; /* clock offset */ } hci_inquiry_response; #define HCI_EVENT_CON_COMPL 0x03 typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* Connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* Connection handle */ bdaddr_t bdaddr; /* remote unit address */ - uint8_t link_type; /* Link type */ - uint8_t encryption_mode; /* Encryption mode */ + u8 link_type; /* Link type */ + u8 encryption_mode; /* Encryption mode */ } hci_con_compl_ep; #define HCI_EVENT_CON_REQ 0x04 typedef struct { bdaddr_t bdaddr; /* remote unit address */ - uint8_t uclass[HCI_CLASS_SIZE]; /* remote unit class */ - uint8_t link_type; /* link type */ + u8 uclass[HCI_CLASS_SIZE]; /* remote unit class */ + u8 link_type; /* link type */ } hci_con_req_ep; #define HCI_EVENT_DISCON_COMPL 0x05 typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint8_t reason; /* reason to disconnect */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u8 reason; /* reason to disconnect */ } hci_discon_compl_ep; #define HCI_EVENT_AUTH_COMPL 0x06 typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ } hci_auth_compl_ep; #define HCI_EVENT_REMOTE_NAME_REQ_COMPL 0x07 typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* remote unit address */ char name[HCI_UNIT_NAME_SIZE]; /* remote unit name */ } hci_remote_name_req_compl_ep; @@ -2112,124 +2112,124 @@ typedef struct #define HCI_EVENT_ENCRYPTION_CHANGE 0x08 typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* Connection handle */ - uint8_t encryption_enable; /* 0x00 - disable */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* Connection handle */ + u8 encryption_enable; /* 0x00 - disable */ } hci_encryption_change_ep; #define HCI_EVENT_CHANGE_CON_LINK_KEY_COMPL 0x09 typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* Connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* Connection handle */ } hci_change_con_link_key_compl_ep; #define HCI_EVENT_MASTER_LINK_KEY_COMPL 0x0a typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* Connection handle */ - uint8_t key_flag; /* Key flag */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* Connection handle */ + u8 key_flag; /* Key flag */ } hci_master_link_key_compl_ep; #define HCI_EVENT_READ_REMOTE_FEATURES_COMPL 0x0b typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* Connection handle */ - uint8_t features[HCI_FEATURES_SIZE]; /* LMP features bitmsk*/ + u8 status; /* 0x00 - success */ + u16 con_handle; /* Connection handle */ + u8 features[HCI_FEATURES_SIZE]; /* LMP features bitmsk*/ } hci_read_remote_features_compl_ep; #define HCI_EVENT_READ_REMOTE_VER_INFO_COMPL 0x0c typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* Connection handle */ - uint8_t lmp_version; /* LMP version */ - uint16_t manufacturer; /* Hardware manufacturer name */ - uint16_t lmp_subversion; /* LMP sub-version */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* Connection handle */ + u8 lmp_version; /* LMP version */ + u16 manufacturer; /* Hardware manufacturer name */ + u16 lmp_subversion; /* LMP sub-version */ } hci_read_remote_ver_info_compl_ep; #define HCI_EVENT_QOS_SETUP_COMPL 0x0d typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint8_t flags; /* reserved for future use */ - uint8_t service_type; /* service type */ - uint32_t token_rate; /* bytes per second */ - uint32_t peak_bandwidth; /* bytes per second */ - uint32_t latency; /* microseconds */ - uint32_t delay_variation; /* microseconds */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u8 flags; /* reserved for future use */ + u8 service_type; /* service type */ + u32 token_rate; /* bytes per second */ + u32 peak_bandwidth; /* bytes per second */ + u32 latency; /* microseconds */ + u32 delay_variation; /* microseconds */ } hci_qos_setup_compl_ep; #define HCI_EVENT_COMMAND_COMPL 0x0e typedef struct { - uint8_t num_cmd_pkts; /* # of HCI command packets */ - uint16_t opcode; /* command OpCode */ + u8 num_cmd_pkts; /* # of HCI command packets */ + u16 opcode; /* command OpCode */ /* command return parameters (if any) */ } hci_command_compl_ep; #define HCI_EVENT_COMMAND_STATUS 0x0f typedef struct { - uint8_t status; /* 0x00 - pending */ - uint8_t num_cmd_pkts; /* # of HCI command packets */ - uint16_t opcode; /* command OpCode */ + u8 status; /* 0x00 - pending */ + u8 num_cmd_pkts; /* # of HCI command packets */ + u16 opcode; /* command OpCode */ } hci_command_status_ep; #define HCI_EVENT_HARDWARE_ERROR 0x10 typedef struct { - uint8_t hardware_code; /* hardware error code */ + u8 hardware_code; /* hardware error code */ } hci_hardware_error_ep; #define HCI_EVENT_FLUSH_OCCUR 0x11 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_flush_occur_ep; #define HCI_EVENT_ROLE_CHANGE 0x12 typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* address of remote unit */ - uint8_t role; /* new connection role */ + u8 role; /* new connection role */ } hci_role_change_ep; #define HCI_EVENT_NUM_COMPL_PKTS 0x13 typedef struct { - uint8_t num_con_handles; /* # of connection handles */ + u8 num_con_handles; /* # of connection handles */ /* these are repeated "num_con_handles" times - uint16_t con_handle; --- connection handle(s) - uint16_t compl_pkts; --- # of completed packets */ + u16 con_handle; --- connection handle(s) + u16 compl_pkts; --- # of completed packets */ } hci_num_compl_pkts_ep; typedef struct { - uint16_t con_handle; - uint16_t compl_pkts; + u16 con_handle; + u16 compl_pkts; } hci_num_compl_pkts_info; #define HCI_EVENT_MODE_CHANGE 0x14 typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint8_t unit_mode; /* remote unit mode */ - uint16_t interval; /* interval * 0.625 msec */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u8 unit_mode; /* remote unit mode */ + u16 interval; /* interval * 0.625 msec */ } hci_mode_change_ep; #define HCI_EVENT_RETURN_LINK_KEYS 0x15 typedef struct { - uint8_t num_keys; /* # of keys */ + u8 num_keys; /* # of keys */ /* these are repeated "num_keys" times bdaddr_t bdaddr; --- remote address(es) - uint8_t key[HCI_KEY_SIZE]; --- key(s) */ + u8 key[HCI_KEY_SIZE]; --- key(s) */ } hci_return_link_keys_ep; #define HCI_EVENT_PIN_CODE_REQ 0x16 @@ -2248,8 +2248,8 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote unit address */ - uint8_t key[HCI_KEY_SIZE]; /* link key */ - uint8_t key_type; /* type of the key */ + u8 key[HCI_KEY_SIZE]; /* link key */ + u8 key_type; /* type of the key */ } hci_link_key_notification_ep; #define HCI_EVENT_LOOPBACK_COMMAND 0x19 @@ -2258,36 +2258,36 @@ typedef hci_cmd_hdr_t hci_loopback_command_ep; #define HCI_EVENT_DATA_BUFFER_OVERFLOW 0x1a typedef struct { - uint8_t link_type; /* Link type */ + u8 link_type; /* Link type */ } hci_data_buffer_overflow_ep; #define HCI_EVENT_MAX_SLOT_CHANGE 0x1b typedef struct { - uint16_t con_handle; /* connection handle */ - uint8_t lmp_max_slots; /* Max. # of slots allowed */ + u16 con_handle; /* connection handle */ + u8 lmp_max_slots; /* Max. # of slots allowed */ } hci_max_slot_change_ep; #define HCI_EVENT_READ_CLOCK_OFFSET_COMPL 0x1c typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* Connection handle */ - uint16_t clock_offset; /* Clock offset */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* Connection handle */ + u16 clock_offset; /* Clock offset */ } hci_read_clock_offset_compl_ep; #define HCI_EVENT_CON_PKT_TYPE_CHANGED 0x1d typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint16_t pkt_type; /* packet type */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u16 pkt_type; /* packet type */ } hci_con_pkt_type_changed_ep; #define HCI_EVENT_QOS_VIOLATION 0x1e typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_qos_violation_ep; /* Page Scan Mode Change Event is deprecated */ @@ -2295,111 +2295,111 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* destination address */ - uint8_t page_scan_mode; /* page scan mode */ + u8 page_scan_mode; /* page scan mode */ } hci_page_scan_mode_change_ep; #define HCI_EVENT_PAGE_SCAN_REP_MODE_CHANGE 0x20 typedef struct { bdaddr_t bdaddr; /* destination address */ - uint8_t page_scan_rep_mode; /* page scan repetition mode */ + u8 page_scan_rep_mode; /* page scan repetition mode */ } hci_page_scan_rep_mode_change_ep; #define HCI_EVENT_FLOW_SPECIFICATION_COMPL 0x21 typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint8_t flags; /* reserved */ - uint8_t direction; /* flow direction */ - uint8_t type; /* service type */ - uint32_t token_rate; /* token rate */ - uint32_t bucket_size; /* token bucket size */ - uint32_t peak_bandwidth; /* peak bandwidth */ - uint32_t latency; /* access latency */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u8 flags; /* reserved */ + u8 direction; /* flow direction */ + u8 type; /* service type */ + u32 token_rate; /* token rate */ + u32 bucket_size; /* token bucket size */ + u32 peak_bandwidth; /* peak bandwidth */ + u32 latency; /* access latency */ } hci_flow_specification_compl_ep; #define HCI_EVENT_RSSI_RESULT 0x22 typedef struct { - uint8_t num_responses; /* number of responses */ + u8 num_responses; /* number of responses */ /* hci_rssi_response[num_responses] -- see below */ } hci_rssi_result_ep; typedef struct { bdaddr_t bdaddr; /* unit address */ - uint8_t page_scan_rep_mode; /* page scan rep. mode */ - uint8_t blank; /* reserved */ - uint8_t uclass[HCI_CLASS_SIZE]; /* unit class */ - uint16_t clock_offset; /* clock offset */ - int8_t rssi; /* rssi */ + u8 page_scan_rep_mode; /* page scan rep. mode */ + u8 blank; /* reserved */ + u8 uclass[HCI_CLASS_SIZE]; /* unit class */ + u16 clock_offset; /* clock offset */ + s8 rssi; /* rssi */ } hci_rssi_response; #define HCI_EVENT_READ_REMOTE_EXTENDED_FEATURES 0x23 typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint8_t page; /* page number */ - uint8_t max; /* max page number */ - uint8_t features[HCI_FEATURES_SIZE]; /* LMP features bitmsk*/ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u8 page; /* page number */ + u8 max; /* max page number */ + u8 features[HCI_FEATURES_SIZE]; /* LMP features bitmsk*/ } hci_read_remote_extended_features_ep; #define HCI_EVENT_SCO_CON_COMPL 0x2c typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ bdaddr_t bdaddr; /* unit address */ - uint8_t link_type; /* link type */ - uint8_t interval; /* transmission interval */ - uint8_t window; /* retransmission window */ - uint16_t rxlen; /* rx packet length */ - uint16_t txlen; /* tx packet length */ - uint8_t mode; /* air mode */ + u8 link_type; /* link type */ + u8 interval; /* transmission interval */ + u8 window; /* retransmission window */ + u16 rxlen; /* rx packet length */ + u16 txlen; /* tx packet length */ + u8 mode; /* air mode */ } hci_sco_con_compl_ep; #define HCI_EVENT_SCO_CON_CHANGED 0x2d typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint8_t interval; /* transmission interval */ - uint8_t window; /* retransmission window */ - uint16_t rxlen; /* rx packet length */ - uint16_t txlen; /* tx packet length */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u8 interval; /* transmission interval */ + u8 window; /* retransmission window */ + u16 rxlen; /* rx packet length */ + u16 txlen; /* tx packet length */ } hci_sco_con_changed_ep; #define HCI_EVENT_SNIFF_SUBRATING 0x2e typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ - uint16_t tx_latency; /* max transmit latency */ - uint16_t rx_latency; /* max receive latency */ - uint16_t remote_timeout; /* remote timeout */ - uint16_t local_timeout; /* local timeout */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ + u16 tx_latency; /* max transmit latency */ + u16 rx_latency; /* max receive latency */ + u16 remote_timeout; /* remote timeout */ + u16 local_timeout; /* local timeout */ } hci_sniff_subrating_ep; #define HCI_EVENT_EXTENDED_RESULT 0x2f typedef struct { - uint8_t num_responses; /* must be 0x01 */ + u8 num_responses; /* must be 0x01 */ bdaddr_t bdaddr; /* remote device address */ - uint8_t page_scan_rep_mode; - uint8_t reserved; - uint8_t uclass[HCI_CLASS_SIZE]; - uint16_t clock_offset; - int8_t rssi; - uint8_t response[240]; /* extended inquiry response */ + u8 page_scan_rep_mode; + u8 reserved; + u8 uclass[HCI_CLASS_SIZE]; + u16 clock_offset; + s8 rssi; + u8 response[240]; /* extended inquiry response */ } hci_extended_result_ep; #define HCI_EVENT_ENCRYPTION_KEY_REFRESH 0x30 typedef struct { - uint8_t status; /* 0x00 - success */ - uint16_t con_handle; /* connection handle */ + u8 status; /* 0x00 - success */ + u16 con_handle; /* connection handle */ } hci_encryption_key_refresh_ep; #define HCI_EVENT_IO_CAPABILITY_REQ 0x31 @@ -2412,16 +2412,16 @@ typedef struct typedef struct { bdaddr_t bdaddr; /* remote device address */ - uint8_t io_capability; - uint8_t oob_data_present; - uint8_t auth_requirement; + u8 io_capability; + u8 oob_data_present; + u8 auth_requirement; } hci_io_capability_rsp_ep; #define HCI_EVENT_USER_CONFIRM_REQ 0x33 typedef struct { bdaddr_t bdaddr; /* remote device address */ - uint32_t value; /* 000000 - 999999 */ + u32 value; /* 000000 - 999999 */ } hci_user_confirm_req_ep; #define HCI_EVENT_USER_PASSKEY_REQ 0x34 @@ -2439,42 +2439,42 @@ typedef struct #define HCI_EVENT_SIMPLE_PAIRING_COMPL 0x36 typedef struct { - uint8_t status; /* 0x00 - success */ + u8 status; /* 0x00 - success */ bdaddr_t bdaddr; /* remote device address */ } hci_simple_pairing_compl_ep; #define HCI_EVENT_LINK_SUPERVISION_TO_CHANGED 0x38 typedef struct { - uint16_t con_handle; /* connection handle */ - uint16_t timeout; /* link supervision timeout */ + u16 con_handle; /* connection handle */ + u16 timeout; /* link supervision timeout */ } hci_link_supervision_to_changed_ep; #define HCI_EVENT_ENHANCED_FLUSH_COMPL 0x39 typedef struct { - uint16_t con_handle; /* connection handle */ + u16 con_handle; /* connection handle */ } hci_enhanced_flush_compl_ep; #define HCI_EVENT_USER_PASSKEY_NOTIFICATION 0x3b typedef struct { bdaddr_t bdaddr; /* remote device address */ - uint32_t value; /* 000000 - 999999 */ + u32 value; /* 000000 - 999999 */ } hci_user_passkey_notification_ep; #define HCI_EVENT_KEYPRESS_NOTIFICATION 0x3c typedef struct { bdaddr_t bdaddr; /* remote device address */ - uint8_t notification_type; + u8 notification_type; } hci_keypress_notification_ep; #define HCI_EVENT_REMOTE_FEATURES_NOTIFICATION 0x3d typedef struct { bdaddr_t bdaddr; /* remote device address */ - uint8_t features[HCI_FEATURES_SIZE]; /* LMP features bitmsk*/ + u8 features[HCI_FEATURES_SIZE]; /* LMP features bitmsk*/ } hci_remote_features_notification_ep; #define HCI_EVENT_BT_LOGO 0xfe @@ -2502,28 +2502,28 @@ typedef struct */ struct hci_filter { - uint32_t mask[8]; /* 256 bits */ + u32 mask[8]; /* 256 bits */ }; -static __inline void hci_filter_set(uint8_t bit, hci_filter* filter) +static __inline void hci_filter_set(u8 bit, hci_filter* filter) { - uint8_t off = bit - 1; + u8 off = bit - 1; off >>= 5; filter->mask[off] |= (1 << ((bit - 1) & 0x1f)); } -static __inline void hci_filter_clr(uint8_t bit, hci_filter* filter) +static __inline void hci_filter_clr(u8 bit, hci_filter* filter) { - uint8_t off = bit - 1; + u8 off = bit - 1; off >>= 5; filter->mask[off] &= ~(1 << ((bit - 1) & 0x1f)); } -static __inline int hci_filter_test(uint8_t bit, const struct hci_filter* filter) +static __inline int hci_filter_test(u8 bit, const struct hci_filter* filter) { - uint8_t off = bit - 1; + u8 off = bit - 1; off >>= 5; return (filter->mask[off] & (1 << ((bit - 1) & 0x1f))); @@ -2551,16 +2551,16 @@ static __inline int hci_filter_test(uint8_t bit, const struct hci_filter* filter struct bt_stats { - uint32_t err_tx; - uint32_t err_rx; - uint32_t cmd_tx; - uint32_t evt_rx; - uint32_t acl_tx; - uint32_t acl_rx; - uint32_t sco_tx; - uint32_t sco_rx; - uint32_t byte_tx; - uint32_t byte_rx; + u32 err_tx; + u32 err_rx; + u32 cmd_tx; + u32 evt_rx; + u32 acl_tx; + u32 acl_rx; + u32 sco_tx; + u32 sco_rx; + u32 byte_tx; + u32 byte_rx; }; struct btreq @@ -2572,14 +2572,14 @@ struct btreq struct { bdaddr_t btri_bdaddr; /* device bdaddr */ - uint16_t btri_flags; /* flags */ - uint16_t btri_num_cmd; /* # of free cmd buffers */ - uint16_t btri_num_acl; /* # of free ACL buffers */ - uint16_t btri_num_sco; /* # of free SCO buffers */ - uint16_t btri_acl_mtu; /* ACL mtu */ - uint16_t btri_sco_mtu; /* SCO mtu */ - uint16_t btri_link_policy; /* Link Policy */ - uint16_t btri_packet_type; /* Packet Type */ + u16 btri_flags; /* flags */ + u16 btri_num_cmd; /* # of free cmd buffers */ + u16 btri_num_acl; /* # of free ACL buffers */ + u16 btri_num_sco; /* # of free SCO buffers */ + u16 btri_acl_mtu; /* ACL mtu */ + u16 btri_sco_mtu; /* SCO mtu */ + u16 btri_link_policy; /* Link Policy */ + u16 btri_packet_type; /* Packet Type */ } btri; bt_stats btrs; /* unit stats */ } btru; @@ -2706,7 +2706,7 @@ struct SHCIEventRequestConnection u8 EventType; u8 PayloadLength; bdaddr_t bdaddr; - uint8_t uclass[HCI_CLASS_SIZE]; /* unit class */ + u8 uclass[HCI_CLASS_SIZE]; /* unit class */ u8 LinkType; }; diff --git a/Source/Core/Core/IOS/USB/Bluetooth/l2cap.h b/Source/Core/Core/IOS/USB/Bluetooth/l2cap.h index 3d8249c0db..e681927afc 100644 --- a/Source/Core/Core/IOS/USB/Bluetooth/l2cap.h +++ b/Source/Core/Core/IOS/USB/Bluetooth/l2cap.h @@ -156,9 +156,9 @@ #define L2CAP_OPT_HINT(type) ((type)&L2CAP_OPT_HINT_BIT) #define L2CAP_OPT_HINT_MASK 0x7f #define L2CAP_OPT_MTU 0x01 -#define L2CAP_OPT_MTU_SIZE sizeof(uint16_t) +#define L2CAP_OPT_MTU_SIZE sizeof(u16) #define L2CAP_OPT_FLUSH_TIMO 0x02 -#define L2CAP_OPT_FLUSH_TIMO_SIZE sizeof(uint16_t) +#define L2CAP_OPT_FLUSH_TIMO_SIZE sizeof(u16) #define L2CAP_OPT_QOS 0x03 #define L2CAP_OPT_QOS_SIZE sizeof(l2cap_qos_t) #define L2CAP_OPT_RFC 0x04 @@ -179,13 +179,13 @@ /* L2CAP Quality of Service option */ typedef struct { - uint8_t flags; /* reserved for future use */ - uint8_t service_type; /* service type */ - uint32_t token_rate; /* bytes per second */ - uint32_t token_bucket_size; /* bytes */ - uint32_t peak_bandwidth; /* bytes per second */ - uint32_t latency; /* microseconds */ - uint32_t delay_variation; /* microseconds */ + u8 flags; /* reserved for future use */ + u8 service_type; /* service type */ + u32 token_rate; /* bytes per second */ + u32 token_bucket_size; /* bytes */ + u32 peak_bandwidth; /* bytes per second */ + u32 latency; /* microseconds */ + u32 delay_variation; /* microseconds */ } l2cap_qos_t; /* L2CAP QoS type */ @@ -197,12 +197,12 @@ typedef struct /* L2CAP Retransmission & Flow Control option */ typedef struct { - uint8_t mode; /* RFC mode */ - uint8_t window_size; /* bytes */ - uint8_t max_transmit; /* max retransmissions */ - uint16_t retransmit_timo; /* milliseconds */ - uint16_t monitor_timo; /* milliseconds */ - uint16_t max_pdu_size; /* bytes */ + u8 mode; /* RFC mode */ + u8 window_size; /* bytes */ + u8 max_transmit; /* max retransmissions */ + u16 retransmit_timo; /* milliseconds */ + u16 monitor_timo; /* milliseconds */ + u16 max_pdu_size; /* bytes */ } l2cap_rfc_t; /* L2CAP RFC mode */ @@ -220,14 +220,14 @@ typedef struct /* L2CAP header */ typedef struct { - uint16_t length; /* payload size */ - uint16_t dcid; /* destination channel ID */ + u16 length; /* payload size */ + u16 dcid; /* destination channel ID */ } l2cap_hdr_t; /* L2CAP ConnectionLess Traffic (dcid == L2CAP_CLT_CID) */ typedef struct { - uint16_t psm; /* Protocol/Service Multiplexor */ + u16 psm; /* Protocol/Service Multiplexor */ } l2cap_clt_hdr_t; #define L2CAP_CLT_MTU_MAXIMUM (L2CAP_MTU_MAXIMUM - sizeof(l2cap_clt_hdr_t)) @@ -235,69 +235,69 @@ typedef struct /* L2CAP Command header (dcid == L2CAP_SIGNAL_CID) */ typedef struct { - uint8_t code; /* command OpCode */ - uint8_t ident; /* identifier to match request and response */ - uint16_t length; /* command parameters length */ + u8 code; /* command OpCode */ + u8 ident; /* identifier to match request and response */ + u16 length; /* command parameters length */ } l2cap_cmd_hdr_t; /* L2CAP Command Reject */ #define L2CAP_COMMAND_REJ 0x01 typedef struct { - uint16_t reason; /* reason to reject command */ - uint16_t data[2]; /* optional data */ + u16 reason; /* reason to reject command */ + u16 data[2]; /* optional data */ } l2cap_cmd_rej_cp; /* L2CAP Connection Request */ #define L2CAP_CONNECT_REQ 0x02 typedef struct { - uint16_t psm; /* Protocol/Service Multiplexor (PSM) */ - uint16_t scid; /* source channel ID */ + u16 psm; /* Protocol/Service Multiplexor (PSM) */ + u16 scid; /* source channel ID */ } l2cap_con_req_cp; /* L2CAP Connection Response */ #define L2CAP_CONNECT_RSP 0x03 typedef struct { - uint16_t dcid; /* destination channel ID */ - uint16_t scid; /* source channel ID */ - uint16_t result; /* 0x00 - success */ - uint16_t status; /* more info if result != 0x00 */ + u16 dcid; /* destination channel ID */ + u16 scid; /* source channel ID */ + u16 result; /* 0x00 - success */ + u16 status; /* more info if result != 0x00 */ } l2cap_con_rsp_cp; /* L2CAP Configuration Request */ #define L2CAP_CONFIG_REQ 0x04 typedef struct { - uint16_t dcid; /* destination channel ID */ - uint16_t flags; /* flags */ - /* uint8_t options[] -- options */ + u16 dcid; /* destination channel ID */ + u16 flags; /* flags */ + /* u8 options[] -- options */ } l2cap_cfg_req_cp; /* L2CAP Configuration Response */ #define L2CAP_CONFIG_RSP 0x05 typedef struct { - uint16_t scid; /* source channel ID */ - uint16_t flags; /* flags */ - uint16_t result; /* 0x00 - success */ - /* uint8_t options[] -- options */ + u16 scid; /* source channel ID */ + u16 flags; /* flags */ + u16 result; /* 0x00 - success */ + /* u8 options[] -- options */ } l2cap_cfg_rsp_cp; /* L2CAP configuration option */ typedef struct { - uint8_t type; - uint8_t length; - /* uint8_t value[] -- option value (depends on type) */ + u8 type; + u8 length; + /* u8 value[] -- option value (depends on type) */ } l2cap_cfg_opt_t; /* L2CAP configuration option value */ typedef union { - uint16_t mtu; /* L2CAP_OPT_MTU */ - uint16_t flush_timo; /* L2CAP_OPT_FLUSH_TIMO */ + u16 mtu; /* L2CAP_OPT_MTU */ + u16 flush_timo; /* L2CAP_OPT_FLUSH_TIMO */ l2cap_qos_t qos; /* L2CAP_OPT_QOS */ l2cap_rfc_t rfc; /* L2CAP_OPT_RFC */ } l2cap_cfg_opt_val_t; @@ -306,8 +306,8 @@ typedef union #define L2CAP_DISCONNECT_REQ 0x06 typedef struct { - uint16_t dcid; /* destination channel ID */ - uint16_t scid; /* source channel ID */ + u16 dcid; /* destination channel ID */ + u16 scid; /* source channel ID */ } l2cap_discon_req_cp; /* L2CAP Disconnect Response */ @@ -327,16 +327,16 @@ typedef l2cap_discon_req_cp l2cap_discon_rsp_cp; #define L2CAP_INFO_REQ 0x0a typedef struct { - uint16_t type; /* requested information type */ + u16 type; /* requested information type */ } l2cap_info_req_cp; /* L2CAP Information Response */ #define L2CAP_INFO_RSP 0x0b typedef struct { - uint16_t type; /* requested information type */ - uint16_t result; /* 0x00 - success */ - /* uint8_t info[] -- info data (depends on type) + u16 type; /* requested information type */ + u16 result; /* 0x00 - success */ + /* u8 info[] -- info data (depends on type) * * L2CAP_CONNLESS_MTU - 2 bytes connectionless MTU */ @@ -347,7 +347,7 @@ typedef union /* L2CAP_CONNLESS_MTU */ struct { - uint16_t mtu; + u16 mtu; } mtu; } l2cap_info_rsp_data_t; diff --git a/Source/Core/Core/MemTools.cpp b/Source/Core/Core/MemTools.cpp index 75d20dd6a9..44a82898f4 100644 --- a/Source/Core/Core/MemTools.cpp +++ b/Source/Core/Core/MemTools.cpp @@ -139,7 +139,7 @@ static void ExceptionThread(mach_port_t port) NDR_record_t NDR; exception_type_t exception; mach_msg_type_number_t codeCnt; - int64_t code[2]; + s64 code[2]; int flavor; mach_msg_type_number_t old_stateCnt; natural_t old_state[THREAD_STATE64_COUNT]; diff --git a/Source/Core/DiscIO/WIACompression.cpp b/Source/Core/DiscIO/WIACompression.cpp index cb8fdee389..dd650478a6 100644 --- a/Source/Core/DiscIO/WIACompression.cpp +++ b/Source/Core/DiscIO/WIACompression.cpp @@ -616,7 +616,7 @@ LZMACompressor::LZMACompressor(bool lzma2, int compression_level, u8 compressor_ u8* compressor_data_size_out) { // lzma_lzma_preset returns false on success for some reason - if (lzma_lzma_preset(&m_options, static_cast(compression_level))) + if (lzma_lzma_preset(&m_options, static_cast(compression_level))) { m_initialization_failed = true; return; diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp index 539bbe769f..25ea147443 100644 --- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp +++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp @@ -151,7 +151,7 @@ bool Host_UpdateDiscordPresenceRaw(const std::string& details, const std::string const std::string& large_image_text, const std::string& small_image_key, const std::string& small_image_text, - const int64_t start_timestamp, const int64_t end_timestamp, + const s64 start_timestamp, const s64 end_timestamp, const int party_size, const int party_max) { #ifdef USE_DISCORD_PRESENCE diff --git a/Source/Core/DolphinQt/Host.cpp b/Source/Core/DolphinQt/Host.cpp index a81924cfd8..10607cd69c 100644 --- a/Source/Core/DolphinQt/Host.cpp +++ b/Source/Core/DolphinQt/Host.cpp @@ -319,7 +319,7 @@ bool Host_UpdateDiscordPresenceRaw(const std::string& details, const std::string const std::string& large_image_text, const std::string& small_image_key, const std::string& small_image_text, - const int64_t start_timestamp, const int64_t end_timestamp, + const s64 start_timestamp, const s64 end_timestamp, const int party_size, const int party_max) { #ifdef USE_DISCORD_PRESENCE diff --git a/Source/Core/DolphinTool/ToolHeadlessPlatform.cpp b/Source/Core/DolphinTool/ToolHeadlessPlatform.cpp index 59495a7d43..65cfe8f599 100644 --- a/Source/Core/DolphinTool/ToolHeadlessPlatform.cpp +++ b/Source/Core/DolphinTool/ToolHeadlessPlatform.cpp @@ -55,7 +55,7 @@ bool Host_UpdateDiscordPresenceRaw(const std::string& details, const std::string const std::string& large_image_text, const std::string& small_image_key, const std::string& small_image_text, - const int64_t start_timestamp, const int64_t end_timestamp, + const s64 start_timestamp, const s64 end_timestamp, const int party_size, const int party_max) { return false; diff --git a/Source/Core/InputCommon/ControllerInterface/WGInput/WGInput.cpp b/Source/Core/InputCommon/ControllerInterface/WGInput/WGInput.cpp index a688ca0366..5a8a05860b 100644 --- a/Source/Core/InputCommon/ControllerInterface/WGInput/WGInput.cpp +++ b/Source/Core/InputCommon/ControllerInterface/WGInput/WGInput.cpp @@ -316,7 +316,7 @@ private: public: IndexedSwitch(const WGI::GameControllerSwitchPosition* swtch, u32 index, WGI::GameControllerSwitchPosition direction) - : m_switch(*swtch), m_index(index), m_direction(static_cast(direction)) + : m_switch(*swtch), m_index(index), m_direction(static_cast(direction)) { } std::string GetName() const override @@ -331,14 +331,14 @@ private: // All of the "inbetween" states (e.g. Up-Right) are one-off from the four cardinal // directions. This tests that the current switch state value is within 1 of the desired // state. - const auto direction_diff = std::abs(static_cast(m_switch) - m_direction); + const auto direction_diff = std::abs(static_cast(m_switch) - m_direction); return ControlState(direction_diff <= 1 || direction_diff == 7); } private: const WGI::GameControllerSwitchPosition& m_switch; const u32 m_index; - const int32_t m_direction; + const s32 m_direction; }; class Battery : public Input @@ -433,7 +433,7 @@ private: lbl = WGI::GameControllerButtonLabel::None; } - const int32_t button_name_idx = static_cast(lbl); + const s32 button_name_idx = static_cast(lbl); if (lbl != WGI::GameControllerButtonLabel::None && button_name_idx < wgi_button_names.size()) AddInput(new NamedButton(&button, wgi_button_names[button_name_idx])); @@ -452,7 +452,7 @@ private: void PopulateHaptics() { - static const std::map waveform_name_map{ + static const std::map waveform_name_map{ {Haptics::KnownSimpleHapticsControllerWaveforms::Click(), "Click"}, {Haptics::KnownSimpleHapticsControllerWaveforms::BuzzContinuous(), "Buzz"}, {Haptics::KnownSimpleHapticsControllerWaveforms::RumbleContinuous(), "Rumble"}, @@ -467,7 +467,7 @@ private: for (Haptics::SimpleHapticsControllerFeedback feedback : haptics_controller.SupportedFeedback()) { - const uint16_t waveform = feedback.Waveform(); + const u16 waveform = feedback.Waveform(); auto waveform_name_it = waveform_name_map.find(waveform); if (waveform_name_it == waveform_name_map.end()) { @@ -582,8 +582,8 @@ private: break; } - const int32_t full_value = report.FullChargeCapacityInMilliwattHours().GetInt32(); - const int32_t remaining_value = report.RemainingCapacityInMilliwattHours().GetInt32(); + const s32 full_value = report.FullChargeCapacityInMilliwattHours().GetInt32(); + const s32 remaining_value = report.RemainingCapacityInMilliwattHours().GetInt32(); m_battery_level = BATTERY_INPUT_MAX_VALUE * remaining_value / full_value; return true; } diff --git a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp index bb51d0026e..6f33998208 100644 --- a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp +++ b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp @@ -416,8 +416,8 @@ void InputBackend::StopHotplugThread() } // Write something to efd so that select() stops blocking. - const uint64_t value = 1; - static_cast(!write(m_wakeup_eventfd, &value, sizeof(uint64_t))); + const u64 value = 1; + static_cast(!write(m_wakeup_eventfd, &value, sizeof(u64))); m_hotplug_thread.join(); close(m_wakeup_eventfd); diff --git a/Source/Core/UICommon/DBusUtils.cpp b/Source/Core/UICommon/DBusUtils.cpp index 6f92f662c5..aa8fea5954 100644 --- a/Source/Core/UICommon/DBusUtils.cpp +++ b/Source/Core/UICommon/DBusUtils.cpp @@ -23,11 +23,11 @@ static void Uninhibit(); static constexpr char s_app_id[] = "org.DolphinEmu.dolphin-emu"; // Cookie for the org.freedesktop.ScreenSaver interface -static uint32_t s_fdo_cookie = 0; +static u32 s_fdo_cookie = 0; // Cookie for the org.xfce.ScreenSaver interface -static uint32_t s_xfce_cookie = 0; +static u32 s_xfce_cookie = 0; // Cookie for the org.mate.ScreenSaver interface -static uint32_t s_mate_cookie = 0; +static u32 s_mate_cookie = 0; // Return handle for the org.freedesktop.portal.Desktop interface static QString s_portal_handle; @@ -53,7 +53,7 @@ static bool InhibitXfce() if (!interface.isValid()) return false; - QDBusReply reply = interface.call("Inhibit", s_app_id, QObject::tr("Playing a game")); + QDBusReply reply = interface.call("Inhibit", s_app_id, QObject::tr("Playing a game")); if (interface.lastError().isValid()) { WARN_LOG_FMT(VIDEO, "org.xfce.ScreenSaver::Inhibit failed: {}", @@ -74,7 +74,7 @@ static bool InhibitMate() if (!interface.isValid()) return false; - QDBusReply reply = interface.call("Inhibit", s_app_id, QObject::tr("Playing a game")); + QDBusReply reply = interface.call("Inhibit", s_app_id, QObject::tr("Playing a game")); if (interface.lastError().isValid()) { WARN_LOG_FMT(VIDEO, "org.mate.ScreenSaver::Inhibit failed: {}", @@ -94,7 +94,7 @@ static bool InhibitFDO() if (!interface.isValid()) return false; - QDBusReply reply = interface.call("Inhibit", s_app_id, QObject::tr("Playing a game")); + QDBusReply reply = interface.call("Inhibit", s_app_id, QObject::tr("Playing a game")); if (interface.lastError().isValid()) { WARN_LOG_FMT(VIDEO, "org.freedesktop.ScreenSaver::Inhibit failed: {}", @@ -118,7 +118,7 @@ static bool InhibitPortal() QHash options; options["handle_token"] = "dolphin_" + QString::number(std::rand(), 0x10); options["reason"] = QObject::tr("Playing a game"); - uint32_t flags = 9; // logout | idle + u32 flags = 9; // logout | idle QDBusReply reply = interface.call("Inhibit", "", flags, options); if (interface.lastError().isValid()) { diff --git a/Source/Core/UICommon/DiscordPresence.cpp b/Source/Core/UICommon/DiscordPresence.cpp index 67870999aa..71aa9cb738 100644 --- a/Source/Core/UICommon/DiscordPresence.cpp +++ b/Source/Core/UICommon/DiscordPresence.cpp @@ -36,7 +36,7 @@ namespace { Handler* event_handler = nullptr; const char* username = ""; -static int64_t s_start_timestamp = std::chrono::duration_cast( +static s64 s_start_timestamp = std::chrono::duration_cast( std::chrono::system_clock::now().time_since_epoch()) .count(); @@ -168,8 +168,8 @@ bool UpdateDiscordPresenceRaw(const std::string& details, const std::string& sta const std::string& large_image_key, const std::string& large_image_text, const std::string& small_image_key, - const std::string& small_image_text, const int64_t start_timestamp, - const int64_t end_timestamp, const int party_size, + const std::string& small_image_text, const s64 start_timestamp, + const s64 end_timestamp, const int party_size, const int party_max) { #ifdef USE_DISCORD_PRESENCE diff --git a/Source/Core/UICommon/DiscordPresence.h b/Source/Core/UICommon/DiscordPresence.h index 4e628337d8..b304bdacb3 100644 --- a/Source/Core/UICommon/DiscordPresence.h +++ b/Source/Core/UICommon/DiscordPresence.h @@ -6,6 +6,8 @@ #include #include +#include "Common/CommonTypes.h" + namespace Discord { // The number is the client ID for Dolphin, it's used for images and the application name @@ -36,7 +38,7 @@ bool UpdateDiscordPresenceRaw(const std::string& details = {}, const std::string const std::string& large_image_text = {}, const std::string& small_image_key = {}, const std::string& small_image_text = {}, - const int64_t start_timestamp = 0, const int64_t end_timestamp = 0, + const s64 start_timestamp = 0, const s64 end_timestamp = 0, const int party_size = 0, const int party_max = 0); void UpdateDiscordPresence(int party_size = 0, SecretType type = SecretType::Empty, const std::string& secret = {}, const std::string& current_game = {}, diff --git a/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp b/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp index be262d98dd..d0a5e85b5c 100644 --- a/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp +++ b/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp @@ -68,7 +68,7 @@ bool CommandBufferManager::CreateCommandBuffers() VkCommandBufferAllocateInfo buffer_info = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, nullptr, resources.command_pool, - VK_COMMAND_BUFFER_LEVEL_PRIMARY, static_cast(resources.command_buffers.size())}; + VK_COMMAND_BUFFER_LEVEL_PRIMARY, static_cast(resources.command_buffers.size())}; res = vkAllocateCommandBuffers(device, &buffer_info, resources.command_buffers.data()); if (res != VK_SUCCESS) @@ -302,7 +302,7 @@ void CommandBufferManager::WaitForCommandBufferCompletion(u32 index) void CommandBufferManager::SubmitCommandBuffer(bool submit_on_worker_thread, bool wait_for_completion, bool advance_to_next_frame, VkSwapchainKHR present_swap_chain, - uint32_t present_image_index) + u32 present_image_index) { // End the current command buffer. CmdBufferResources& resources = GetCurrentCmdBufferResources(); @@ -387,7 +387,7 @@ void CommandBufferManager::SubmitCommandBuffer(u32 command_buffer_index, CmdBufferResources& resources = m_command_buffers[command_buffer_index]; // This may be executed on the worker thread, so don't modify any state of the manager class. - uint32_t wait_bits = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; + u32 wait_bits = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; VkSubmitInfo submit_info = {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 0, diff --git a/Source/Core/VideoBackends/Vulkan/CommandBufferManager.h b/Source/Core/VideoBackends/Vulkan/CommandBufferManager.h index c6f167cf38..15f341f6c3 100644 --- a/Source/Core/VideoBackends/Vulkan/CommandBufferManager.h +++ b/Source/Core/VideoBackends/Vulkan/CommandBufferManager.h @@ -14,7 +14,7 @@ #include #include -#include +#include "Common/WorkQueueThread.h" #include "Common/BlockingLoop.h" #include "Common/Flag.h" #include "Common/Semaphore.h" @@ -87,7 +87,7 @@ public: void SubmitCommandBuffer(bool submit_on_worker_thread, bool wait_for_completion, bool advance_to_next_frame = false, VkSwapchainKHR present_swap_chain = VK_NULL_HANDLE, - uint32_t present_image_index = 0xFFFFFFFF); + u32 present_image_index = 0xFFFFFFFF); // Was the last present submitted to the queue a failure? If so, we must recreate our swapchain. bool CheckLastPresentFail() { return m_last_present_failed.TestAndClear(); } diff --git a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp index e32675fe57..8adb6a02e4 100644 --- a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp +++ b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp @@ -433,7 +433,7 @@ VkRenderPass ObjectCache::GetRenderPass(VkFormat color_format, VkFormat depth_fo if (color_format != VK_FORMAT_UNDEFINED) { VkAttachmentReference color_reference; - color_reference.attachment = static_cast(attachments.size()); + color_reference.attachment = static_cast(attachments.size()); color_reference.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; color_attachment_references.push_back(std::move(color_reference)); attachments.push_back({0, color_format, static_cast(multisamples), @@ -444,7 +444,7 @@ VkRenderPass ObjectCache::GetRenderPass(VkFormat color_format, VkFormat depth_fo } if (depth_format != VK_FORMAT_UNDEFINED) { - depth_reference.attachment = static_cast(attachments.size()); + depth_reference.attachment = static_cast(attachments.size()); depth_reference.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; depth_reference_ptr = &depth_reference; attachments.push_back({0, depth_format, static_cast(multisamples), @@ -457,7 +457,7 @@ VkRenderPass ObjectCache::GetRenderPass(VkFormat color_format, VkFormat depth_fo for (u8 i = 0; i < additional_attachment_count; i++) { VkAttachmentReference color_reference; - color_reference.attachment = static_cast(attachments.size()); + color_reference.attachment = static_cast(attachments.size()); color_reference.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; color_attachment_references.push_back(std::move(color_reference)); attachments.push_back({0, color_format, static_cast(multisamples), @@ -472,7 +472,7 @@ VkRenderPass ObjectCache::GetRenderPass(VkFormat color_format, VkFormat depth_fo VK_PIPELINE_BIND_POINT_GRAPHICS, 0, nullptr, - static_cast(color_attachment_references.size()), + static_cast(color_attachment_references.size()), color_attachment_references.empty() ? nullptr : color_attachment_references.data(), nullptr, depth_reference_ptr, @@ -481,7 +481,7 @@ VkRenderPass ObjectCache::GetRenderPass(VkFormat color_format, VkFormat depth_fo VkRenderPassCreateInfo pass_info = {VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, nullptr, 0, - static_cast(attachments.size()), + static_cast(attachments.size()), attachments.data(), 1, &subpass, diff --git a/Source/Core/VideoBackends/Vulkan/StagingBuffer.cpp b/Source/Core/VideoBackends/Vulkan/StagingBuffer.cpp index c053ced700..0cfdadf064 100644 --- a/Source/Core/VideoBackends/Vulkan/StagingBuffer.cpp +++ b/Source/Core/VideoBackends/Vulkan/StagingBuffer.cpp @@ -40,8 +40,8 @@ void StagingBuffer::BufferMemoryBarrier(VkCommandBuffer command_buffer, VkBuffer nullptr, // const void* pNext src_access_mask, // VkAccessFlags srcAccessMask dst_access_mask, // VkAccessFlags dstAccessMask - VK_QUEUE_FAMILY_IGNORED, // uint32_t srcQueueFamilyIndex - VK_QUEUE_FAMILY_IGNORED, // uint32_t dstQueueFamilyIndex + VK_QUEUE_FAMILY_IGNORED, // u32 srcQueueFamilyIndex + VK_QUEUE_FAMILY_IGNORED, // u32 dstQueueFamilyIndex buffer, // VkBuffer buffer offset, // VkDeviceSize offset size // VkDeviceSize size @@ -133,8 +133,8 @@ bool StagingBuffer::AllocateBuffer(STAGING_BUFFER_TYPE type, VkDeviceSize size, size, // VkDeviceSize size usage, // VkBufferUsageFlags usage VK_SHARING_MODE_EXCLUSIVE, // VkSharingMode sharingMode - 0, // uint32_t queueFamilyIndexCount - nullptr // const uint32_t* pQueueFamilyIndices + 0, // u32 queueFamilyIndexCount + nullptr // const u32* pQueueFamilyIndices }; VmaAllocationCreateInfo alloc_create_info = {}; diff --git a/Source/Core/VideoBackends/Vulkan/StateTracker.cpp b/Source/Core/VideoBackends/Vulkan/StateTracker.cpp index 332cd41cbf..0ca18f0997 100644 --- a/Source/Core/VideoBackends/Vulkan/StateTracker.cpp +++ b/Source/Core/VideoBackends/Vulkan/StateTracker.cpp @@ -505,7 +505,7 @@ void StateTracker::UpdateGXDescriptorSet() writes[num_writes++] = {VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, nullptr, m_gx_descriptor_sets[0], - static_cast(i), + static_cast(i), 0, 1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, @@ -721,7 +721,7 @@ void StateTracker::UpdateComputeDescriptorSet() nullptr, nullptr}; - vkUpdateDescriptorSets(g_vulkan_context->GetDevice(), static_cast(dswrites.size()), + vkUpdateDescriptorSets(g_vulkan_context->GetDevice(), static_cast(dswrites.size()), dswrites.data(), 0, nullptr); m_dirty_flags = (m_dirty_flags & ~DIRTY_FLAG_COMPUTE_BINDINGS) | DIRTY_FLAG_COMPUTE_DESCRIPTOR_SET; diff --git a/Source/Core/VideoBackends/Vulkan/VKBoundingBox.cpp b/Source/Core/VideoBackends/Vulkan/VKBoundingBox.cpp index af51293500..86fc3c2b51 100644 --- a/Source/Core/VideoBackends/Vulkan/VKBoundingBox.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKBoundingBox.cpp @@ -112,8 +112,8 @@ bool VKBoundingBox::CreateGPUBuffer() BUFFER_SIZE, // VkDeviceSize size buffer_usage, // VkBufferUsageFlags usage VK_SHARING_MODE_EXCLUSIVE, // VkSharingMode sharingMode - 0, // uint32_t queueFamilyIndexCount - nullptr // const uint32_t* pQueueFamilyIndices + 0, // u32 queueFamilyIndexCount + nullptr // const u32* pQueueFamilyIndices }; VmaAllocationCreateInfo alloc_create_info = {}; diff --git a/Source/Core/VideoBackends/Vulkan/VKGfx.cpp b/Source/Core/VideoBackends/Vulkan/VKGfx.cpp index d65a5d4680..d2a9d4ae46 100644 --- a/Source/Core/VideoBackends/Vulkan/VKGfx.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKGfx.cpp @@ -108,7 +108,7 @@ void VKGfx::ClearRegion(const MathUtil::Rectangle& target_rc, bool color_en { VkRect2D target_vk_rc = { {target_rc.left, target_rc.top}, - {static_cast(target_rc.GetWidth()), static_cast(target_rc.GetHeight())}}; + {static_cast(target_rc.GetWidth()), static_cast(target_rc.GetHeight())}}; // Convert RGBA8 -> floating-point values. VkClearValue clear_color_value = {}; @@ -199,7 +199,7 @@ void VKGfx::ClearRegion(const MathUtil::Rectangle& target_rc, bool color_en StateTracker::GetInstance()->BeginRenderPass(); vkCmdClearAttachments(g_command_buffer_mgr->GetCurrentCommandBuffer(), - static_cast(clear_attachments.size()), + static_cast(clear_attachments.size()), clear_attachments.data(), 1, &vk_rect); } } diff --git a/Source/Core/VideoBackends/Vulkan/VKPerfQuery.cpp b/Source/Core/VideoBackends/Vulkan/VKPerfQuery.cpp index c6aee79327..d3d0ef52a7 100644 --- a/Source/Core/VideoBackends/Vulkan/VKPerfQuery.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKPerfQuery.cpp @@ -146,7 +146,7 @@ bool PerfQuery::CreateQueryPool() nullptr, // const void* pNext 0, // VkQueryPoolCreateFlags flags VK_QUERY_TYPE_OCCLUSION, // VkQueryType queryType - PERF_QUERY_BUFFER_SIZE, // uint32_t queryCount + PERF_QUERY_BUFFER_SIZE, // u32 queryCount 0 // VkQueryPipelineStatisticFlags pipelineStatistics; }; diff --git a/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp b/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp index 83cd9367b5..f542dead1b 100644 --- a/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp @@ -206,7 +206,7 @@ GetVulkanAttachmentBlendState(const BlendingState& state, AbstractPipelineUsage static VkPipelineColorBlendStateCreateInfo GetVulkanColorBlendState(const BlendingState& state, const VkPipelineColorBlendAttachmentState* attachments, - uint32_t num_attachments) + u32 num_attachments) { static constexpr std::array vk_logic_ops = { {VK_LOGIC_OP_CLEAR, VK_LOGIC_OP_AND, VK_LOGIC_OP_AND_REVERSE, VK_LOGIC_OP_COPY, @@ -232,7 +232,7 @@ GetVulkanColorBlendState(const BlendingState& state, 0, // VkPipelineColorBlendStateCreateFlags flags vk_logic_op_enable, // VkBool32 logicOpEnable vk_logic_op, // VkLogicOp logicOp - num_attachments, // uint32_t attachmentCount + num_attachments, // u32 attachmentCount attachments, // const VkPipelineColorBlendAttachmentState* pAttachments {1.0f, 1.0f, 1.0f, 1.0f} // float blendConstants[4] }; @@ -280,9 +280,9 @@ std::unique_ptr VKPipeline::Create(const AbstractPipelineConfig& con VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, // VkStructureType sType nullptr, // const void* pNext 0, // VkPipelineVertexInputStateCreateFlags flags - 0, // uint32_t vertexBindingDescriptionCount + 0, // u32 vertexBindingDescriptionCount nullptr, // const VkVertexInputBindingDescription* pVertexBindingDescriptions - 0, // uint32_t vertexAttributeDescriptionCount + 0, // u32 vertexAttributeDescriptionCount nullptr // const VkVertexInputAttributeDescription* pVertexAttributeDescriptions }; @@ -314,7 +314,7 @@ std::unique_ptr VKPipeline::Create(const AbstractPipelineConfig& con // Shaders to stages VkPipelineShaderStageCreateInfo shader_stages[3]; - uint32_t num_shader_stages = 0; + u32 num_shader_stages = 0; if (config.vertex_shader) { shader_stages[num_shader_stages++] = { @@ -366,7 +366,7 @@ std::unique_ptr VKPipeline::Create(const AbstractPipelineConfig& con } VkPipelineColorBlendStateCreateInfo blend_state = GetVulkanColorBlendState(config.blending_state, blend_attachment_states.data(), - static_cast(blend_attachment_states.size())); + static_cast(blend_attachment_states.size())); // This viewport isn't used, but needs to be specified anyway. static const VkViewport viewport = {0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f}; @@ -375,9 +375,9 @@ std::unique_ptr VKPipeline::Create(const AbstractPipelineConfig& con VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, nullptr, 0, // VkPipelineViewportStateCreateFlags flags; - 1, // uint32_t viewportCount + 1, // u32 viewportCount &viewport, // const VkViewport* pViewports - 1, // uint32_t scissorCount + 1, // u32 scissorCount &scissor // const VkRect2D* pScissors }; @@ -389,7 +389,7 @@ std::unique_ptr VKPipeline::Create(const AbstractPipelineConfig& con static const VkPipelineDynamicStateCreateInfo dynamic_state = { VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, nullptr, 0, // VkPipelineDynamicStateCreateFlags flags - static_cast(dynamic_states.size()), // uint32_t dynamicStateCount + static_cast(dynamic_states.size()), // u32 dynamicStateCount dynamic_states.data() // const VkDynamicState* pDynamicStates }; @@ -398,10 +398,10 @@ std::unique_ptr VKPipeline::Create(const AbstractPipelineConfig& con VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, nullptr, // VkStructureType sType 0, // VkPipelineCreateFlags flags - num_shader_stages, // uint32_t stageCount + num_shader_stages, // u32 stageCount shader_stages, // const VkPipelineShaderStageCreateInfo* pStages &vertex_input_state, // const VkPipelineVertexInputStateCreateInfo* pVertexInputState - &input_assembly_state, // const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState + &input_assembly_state, // const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState nullptr, // const VkPipelineTessellationStateCreateInfo* pTessellationState &viewport_state, // const VkPipelineViewportStateCreateInfo* pViewportState &rasterization_state, // const VkPipelineRasterizationStateCreateInfo* pRasterizationState @@ -411,9 +411,9 @@ std::unique_ptr VKPipeline::Create(const AbstractPipelineConfig& con &dynamic_state, // const VkPipelineDynamicStateCreateInfo* pDynamicState pipeline_layout, // VkPipelineLayout layout render_pass, // VkRenderPass renderPass - 0, // uint32_t subpass + 0, // u32 subpass VK_NULL_HANDLE, // VkPipeline basePipelineHandle - -1 // int32_t basePipelineIndex + -1 // s32 basePipelineIndex }; VkPipeline pipeline; diff --git a/Source/Core/VideoBackends/Vulkan/VKShader.cpp b/Source/Core/VideoBackends/Vulkan/VKShader.cpp index 81d7c23789..a3467f907e 100644 --- a/Source/Core/VideoBackends/Vulkan/VKShader.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKShader.cpp @@ -24,7 +24,7 @@ VKShader::VKShader(ShaderStage stage, std::vector spv, VkShaderModule mod, VkDebugUtilsObjectNameInfoEXT name_info = {}; name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT; name_info.objectType = VK_OBJECT_TYPE_SHADER_MODULE; - name_info.objectHandle = reinterpret_cast(m_module); + name_info.objectHandle = reinterpret_cast(m_module); name_info.pObjectName = m_name.data(); vkSetDebugUtilsObjectNameEXT(g_vulkan_context->GetDevice(), &name_info); } @@ -39,7 +39,7 @@ VKShader::VKShader(std::vector spv, VkPipeline compute_pipeline, std::strin VkDebugUtilsObjectNameInfoEXT name_info = {}; name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT; name_info.objectType = VK_OBJECT_TYPE_PIPELINE; - name_info.objectHandle = reinterpret_cast(m_compute_pipeline); + name_info.objectHandle = reinterpret_cast(m_compute_pipeline); name_info.pObjectName = m_name.data(); vkSetDebugUtilsObjectNameEXT(g_vulkan_context->GetDevice(), &name_info); } diff --git a/Source/Core/VideoBackends/Vulkan/VKStreamBuffer.cpp b/Source/Core/VideoBackends/Vulkan/VKStreamBuffer.cpp index 3efa00f6fa..57f153e801 100644 --- a/Source/Core/VideoBackends/Vulkan/VKStreamBuffer.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKStreamBuffer.cpp @@ -46,8 +46,8 @@ bool StreamBuffer::AllocateBuffer() static_cast(m_size), // VkDeviceSize size m_usage, // VkBufferUsageFlags usage VK_SHARING_MODE_EXCLUSIVE, // VkSharingMode sharingMode - 0, // uint32_t queueFamilyIndexCount - nullptr // const uint32_t* pQueueFamilyIndices + 0, // u32 queueFamilyIndexCount + nullptr // const u32* pQueueFamilyIndices }; VmaAllocationCreateInfo alloc_create_info = {}; diff --git a/Source/Core/VideoBackends/Vulkan/VKSwapChain.cpp b/Source/Core/VideoBackends/Vulkan/VKSwapChain.cpp index f7260bdf0c..990c2a600c 100644 --- a/Source/Core/VideoBackends/Vulkan/VKSwapChain.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKSwapChain.cpp @@ -289,7 +289,7 @@ bool SwapChain::CreateSwapChain() return false; // Select number of images in swap chain, we prefer one buffer in the background to work on - uint32_t image_count = surface_capabilities.minImageCount + 1; + u32 image_count = surface_capabilities.minImageCount + 1; // maxImageCount can be zero, in which case there isn't an upper limit on the number of buffers. if (surface_capabilities.maxImageCount > 0) @@ -322,7 +322,7 @@ bool SwapChain::CreateSwapChain() } // Select the number of image layers for Quad-Buffered stereoscopy - uint32_t image_layers = g_ActiveConfig.stereo_mode == StereoMode::QuadBuffer ? 2 : 1; + u32 image_layers = g_ActiveConfig.stereo_mode == StereoMode::QuadBuffer ? 2 : 1; // Store the old/current swap chain when recreating for resize VkSwapchainKHR old_swap_chain = m_swap_chain; @@ -347,7 +347,7 @@ bool SwapChain::CreateSwapChain() m_present_mode, VK_TRUE, old_swap_chain}; - std::array indices = {{ + std::array indices = {{ g_vulkan_context->GetGraphicsQueueFamilyIndex(), g_vulkan_context->GetPresentQueueFamilyIndex(), }}; @@ -410,7 +410,7 @@ bool SwapChain::SetupSwapChainImages() { ASSERT(m_swap_chain_images.empty()); - uint32_t image_count; + u32 image_count; VkResult res = vkGetSwapchainImagesKHR(g_vulkan_context->GetDevice(), m_swap_chain, &image_count, nullptr); if (res != VK_SUCCESS) @@ -438,7 +438,7 @@ bool SwapChain::SetupSwapChainImages() } m_swap_chain_images.reserve(image_count); - for (uint32_t i = 0; i < image_count; i++) + for (u32 i = 0; i < image_count; i++) { SwapChainImage image; image.image = images[i]; diff --git a/Source/Core/VideoBackends/Vulkan/VKTexture.cpp b/Source/Core/VideoBackends/Vulkan/VKTexture.cpp index 6756305d1e..5449b333ef 100644 --- a/Source/Core/VideoBackends/Vulkan/VKTexture.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKTexture.cpp @@ -37,7 +37,7 @@ VKTexture::VKTexture(const TextureConfig& tex_config, VmaAllocation alloc, VkIma VkDebugUtilsObjectNameInfoEXT name_info = {}; name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT; name_info.objectType = VK_OBJECT_TYPE_IMAGE; - name_info.objectHandle = reinterpret_cast(image); + name_info.objectHandle = reinterpret_cast(image); name_info.pObjectName = m_name.c_str(); vkSetDebugUtilsObjectNameEXT(g_vulkan_context->GetDevice(), &name_info); } @@ -299,7 +299,7 @@ void VKTexture::CopyRectangleFromTexture(const AbstractTexture* src, {src_rect.left, src_rect.top, 0}, {VK_IMAGE_ASPECT_COLOR_BIT, dst_level, dst_layer, copy_layer_count}, {dst_rect.left, dst_rect.top, 0}, - {static_cast(src_rect.GetWidth()), static_cast(src_rect.GetHeight()), 1}}; + {static_cast(src_rect.GetWidth()), static_cast(src_rect.GetHeight()), 1}}; // Must be called outside of a render pass. StateTracker::GetInstance()->EndRenderPass(); @@ -426,8 +426,8 @@ void VKTexture::Load(u32 level, u32 width, u32 height, u32 row_length, const u8* // Copy from the streaming buffer to the actual image. VkBufferImageCopy image_copy = { upload_buffer_offset, // VkDeviceSize bufferOffset - row_length, // uint32_t bufferRowLength - 0, // uint32_t bufferImageHeight + row_length, // u32 bufferRowLength + 0, // u32 bufferImageHeight {VK_IMAGE_ASPECT_COLOR_BIT, level, layer, 1}, // VkImageSubresourceLayers imageSubresource {0, 0, 0}, // VkOffset3D imageOffset {width, height, 1} // VkExtent3D imageExtent @@ -473,8 +473,8 @@ void VKTexture::TransitionToLayout(VkCommandBuffer command_buffer, VkImageLayout 0, // VkAccessFlags dstAccessMask m_layout, // VkImageLayout oldLayout new_layout, // VkImageLayout newLayout - VK_QUEUE_FAMILY_IGNORED, // uint32_t srcQueueFamilyIndex - VK_QUEUE_FAMILY_IGNORED, // uint32_t dstQueueFamilyIndex + VK_QUEUE_FAMILY_IGNORED, // u32 srcQueueFamilyIndex + VK_QUEUE_FAMILY_IGNORED, // u32 dstQueueFamilyIndex m_image, // VkImage image {GetImageAspectForFormat(GetFormat()), 0, GetLevels(), 0, GetLayers()} // VkImageSubresourceRange subresourceRange @@ -620,8 +620,8 @@ void VKTexture::TransitionToLayout(VkCommandBuffer command_buffer, 0, // VkAccessFlags dstAccessMask m_layout, // VkImageLayout oldLayout VK_IMAGE_LAYOUT_GENERAL, // VkImageLayout newLayout - VK_QUEUE_FAMILY_IGNORED, // uint32_t srcQueueFamilyIndex - VK_QUEUE_FAMILY_IGNORED, // uint32_t dstQueueFamilyIndex + VK_QUEUE_FAMILY_IGNORED, // u32 srcQueueFamilyIndex + VK_QUEUE_FAMILY_IGNORED, // u32 dstQueueFamilyIndex m_image, // VkImage image {GetImageAspectForFormat(GetFormat()), 0, GetLevels(), 0, GetLayers()} // VkImageSubresourceRange subresourceRange @@ -1077,7 +1077,7 @@ VKFramebuffer::Create(VKTexture* color_attachment, VKTexture* depth_attachment, nullptr, 0, load_render_pass, - static_cast(attachment_views.size()), + static_cast(attachment_views.size()), attachment_views.data(), width, height, diff --git a/Source/Core/VideoBackends/Vulkan/VKVertexFormat.cpp b/Source/Core/VideoBackends/Vulkan/VKVertexFormat.cpp index 8fb49f0afd..6c8e22ecda 100644 --- a/Source/Core/VideoBackends/Vulkan/VKVertexFormat.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKVertexFormat.cpp @@ -14,7 +14,7 @@ namespace Vulkan { -static VkFormat VarToVkFormat(ComponentFormat t, uint32_t components, bool integer) +static VkFormat VarToVkFormat(ComponentFormat t, u32 components, bool integer) { using ComponentArray = std::array; static constexpr auto f = [](ComponentArray a) { return a; }; // Deduction helper @@ -84,7 +84,7 @@ void VertexFormat::MapAttributes() VarToVkFormat(m_decl.position.type, m_decl.position.components, m_decl.position.integer), m_decl.position.offset); - for (uint32_t i = 0; i < 3; i++) + for (u32 i = 0; i < 3; i++) { if (m_decl.normals[i].enable) AddAttribute(ShaderAttrib::Normal + i, 0, @@ -93,7 +93,7 @@ void VertexFormat::MapAttributes() m_decl.normals[i].offset); } - for (uint32_t i = 0; i < 2; i++) + for (u32 i = 0; i < 2; i++) { if (m_decl.colors[i].enable) AddAttribute(ShaderAttrib::Color0 + i, 0, @@ -102,7 +102,7 @@ void VertexFormat::MapAttributes() m_decl.colors[i].offset); } - for (uint32_t i = 0; i < 8; i++) + for (u32 i = 0; i < 8; i++) { if (m_decl.texcoords[i].enable) AddAttribute(ShaderAttrib::TexCoord0 + i, 0, @@ -132,12 +132,12 @@ void VertexFormat::SetupInputState() m_input_state_info.pVertexAttributeDescriptions = m_attribute_descriptions.data(); } -void VertexFormat::AddAttribute(ShaderAttrib location, uint32_t binding, VkFormat format, - uint32_t offset) +void VertexFormat::AddAttribute(ShaderAttrib location, u32 binding, VkFormat format, + u32 offset) { ASSERT(m_num_attributes < MAX_VERTEX_ATTRIBUTES); - m_attribute_descriptions[m_num_attributes].location = static_cast(location); + m_attribute_descriptions[m_num_attributes].location = static_cast(location); m_attribute_descriptions[m_num_attributes].binding = binding; m_attribute_descriptions[m_num_attributes].format = format; m_attribute_descriptions[m_num_attributes].offset = offset; diff --git a/Source/Core/VideoBackends/Vulkan/VKVertexFormat.h b/Source/Core/VideoBackends/Vulkan/VKVertexFormat.h index 16dae3fa31..b1577acc52 100644 --- a/Source/Core/VideoBackends/Vulkan/VKVertexFormat.h +++ b/Source/Core/VideoBackends/Vulkan/VKVertexFormat.h @@ -25,7 +25,7 @@ public: void SetupInputState(); private: - void AddAttribute(ShaderAttrib location, uint32_t binding, VkFormat format, uint32_t offset); + void AddAttribute(ShaderAttrib location, u32 binding, VkFormat format, u32 offset); VkVertexInputBindingDescription m_binding_description = {}; @@ -34,6 +34,6 @@ private: VkPipelineVertexInputStateCreateInfo m_input_state_info = {}; - uint32_t m_num_attributes = 0; + u32 m_num_attributes = 0; }; } // namespace Vulkan diff --git a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp index 3640752231..b762f59567 100644 --- a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp +++ b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp @@ -249,7 +249,7 @@ VkInstance VulkanContext::CreateVulkanInstance(WindowSystemType wstype, bool ena instance_create_info.pNext = nullptr; instance_create_info.flags = 0; instance_create_info.pApplicationInfo = &app_info; - instance_create_info.enabledExtensionCount = static_cast(enabled_extensions.size()); + instance_create_info.enabledExtensionCount = static_cast(enabled_extensions.size()); instance_create_info.ppEnabledExtensionNames = enabled_extensions.data(); instance_create_info.enabledLayerCount = 0; instance_create_info.ppEnabledLayerNames = nullptr; @@ -697,7 +697,7 @@ bool VulkanContext::CreateDevice(VkSurfaceKHR surface, bool enable_validation_la // Find graphics and present queues. m_graphics_queue_family_index = queue_family_count; m_present_queue_family_index = queue_family_count; - for (uint32_t i = 0; i < queue_family_count; i++) + for (u32 i = 0; i < queue_family_count; i++) { VkBool32 graphics_supported = queue_family_properties[i].queueFlags & VK_QUEUE_GRAPHICS_BIT; if (graphics_supported) @@ -789,7 +789,7 @@ bool VulkanContext::CreateDevice(VkSurfaceKHR surface, bool enable_validation_la device_info.enabledLayerCount = 0; device_info.ppEnabledLayerNames = nullptr; - device_info.enabledExtensionCount = static_cast(extension_name_pointers.size()); + device_info.enabledExtensionCount = static_cast(extension_name_pointers.size()); device_info.ppEnabledExtensionNames = extension_name_pointers.data(); WarnMissingDeviceFeatures(); diff --git a/Source/Core/VideoCommon/Assets/CustomTextureData.cpp b/Source/Core/VideoCommon/Assets/CustomTextureData.cpp index d30532142a..4454b9b18e 100644 --- a/Source/Core/VideoCommon/Assets/CustomTextureData.cpp +++ b/Source/Core/VideoCommon/Assets/CustomTextureData.cpp @@ -38,18 +38,18 @@ namespace #pragma pack(push, 1) -const uint32_t DDS_MAGIC = 0x20534444; // "DDS " +const u32 DDS_MAGIC = 0x20534444; // "DDS " struct DDS_PIXELFORMAT { - uint32_t dwSize; - uint32_t dwFlags; - uint32_t dwFourCC; - uint32_t dwRGBBitCount; - uint32_t dwRBitMask; - uint32_t dwGBitMask; - uint32_t dwBBitMask; - uint32_t dwABitMask; + u32 dwSize; + u32 dwFlags; + u32 dwFourCC; + u32 dwRGBBitCount; + u32 dwRBitMask; + u32 dwGBitMask; + u32 dwBBitMask; + u32 dwABitMask; }; #define DDS_FOURCC 0x00000004 // DDPF_FOURCC @@ -77,8 +77,8 @@ struct DDS_PIXELFORMAT #ifndef MAKEFOURCC #define MAKEFOURCC(ch0, ch1, ch2, ch3) \ - ((uint32_t)(uint8_t)(ch0) | ((uint32_t)(uint8_t)(ch1) << 8) | ((uint32_t)(uint8_t)(ch2) << 16) | \ - ((uint32_t)(uint8_t)(ch3) << 24)) + ((u32)(u8)(ch0) | ((u32)(u8)(ch1) << 8) | ((u32)(u8)(ch2) << 16) | \ + ((u32)(u8)(ch3) << 24)) #endif /* defined(MAKEFOURCC) */ #define DDS_HEADER_FLAGS_TEXTURE \ @@ -98,29 +98,29 @@ enum DDS_RESOURCE_DIMENSION struct DDS_HEADER { - uint32_t dwSize; - uint32_t dwFlags; - uint32_t dwHeight; - uint32_t dwWidth; - uint32_t dwPitchOrLinearSize; - uint32_t dwDepth; // only if DDS_HEADER_FLAGS_VOLUME is set in dwFlags - uint32_t dwMipMapCount; - uint32_t dwReserved1[11]; + u32 dwSize; + u32 dwFlags; + u32 dwHeight; + u32 dwWidth; + u32 dwPitchOrLinearSize; + u32 dwDepth; // only if DDS_HEADER_FLAGS_VOLUME is set in dwFlags + u32 dwMipMapCount; + u32 dwReserved1[11]; DDS_PIXELFORMAT ddspf; - uint32_t dwCaps; - uint32_t dwCaps2; - uint32_t dwCaps3; - uint32_t dwCaps4; - uint32_t dwReserved2; + u32 dwCaps; + u32 dwCaps2; + u32 dwCaps3; + u32 dwCaps4; + u32 dwReserved2; }; struct DDS_HEADER_DXT10 { - uint32_t dxgiFormat; - uint32_t resourceDimension; - uint32_t miscFlag; // see DDS_RESOURCE_MISC_FLAG - uint32_t arraySize; - uint32_t miscFlags2; // see DDS_MISC_FLAGS2 + u32 dxgiFormat; + u32 resourceDimension; + u32 miscFlag; // see DDS_RESOURCE_MISC_FLAG + u32 arraySize; + u32 miscFlags2; // see DDS_MISC_FLAGS2 }; #pragma pack(pop) diff --git a/Source/Core/VideoCommon/Assets/MeshAsset.cpp b/Source/Core/VideoCommon/Assets/MeshAsset.cpp index 05a4ba0961..16ac138bc4 100644 --- a/Source/Core/VideoCommon/Assets/MeshAsset.cpp +++ b/Source/Core/VideoCommon/Assets/MeshAsset.cpp @@ -126,7 +126,7 @@ bool UpdateVertexStrideFromPrimitive(const tinygltf::Model& model, u32 accessor_ } const int component_size = - tinygltf::GetComponentSizeInBytes(static_cast(accessor.componentType)); + tinygltf::GetComponentSizeInBytes(static_cast(accessor.componentType)); if (component_size == -1) { ERROR_LOG_FMT(VIDEO, "Failed to update vertex stride, component size was invalid"); @@ -150,7 +150,7 @@ bool CopyBufferDataFromPrimitive(const tinygltf::Model& model, u32 accessor_inde } const int component_size = - tinygltf::GetComponentSizeInBytes(static_cast(accessor.componentType)); + tinygltf::GetComponentSizeInBytes(static_cast(accessor.componentType)); if (component_size == -1) { ERROR_LOG_FMT(VIDEO, "Failed to copy buffer data from primitive, component size was invalid"); diff --git a/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp b/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp index d698af8cd5..3892561c25 100644 --- a/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp +++ b/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp @@ -258,7 +258,7 @@ bool FFMpegFrameDump::CreateVideoFile() m_context->height, time_base.den, time_base.num); m_context->codec->codec_type = AVMEDIA_TYPE_VIDEO; - m_context->codec->bit_rate = static_cast(g_Config.iBitrateKbps) * 1000; + m_context->codec->bit_rate = static_cast(g_Config.iBitrateKbps) * 1000; m_context->codec->width = m_context->width; m_context->codec->height = m_context->height; m_context->codec->time_base = time_base; diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 61882476d7..4b50919e57 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -1195,7 +1195,7 @@ private: auto* dst_pixel = dst + (j + i * dst_shape.row_length) * 4; for (int channel = 0; channel < 4; channel++) { - uint32_t channel_value = samples[0][channel] + samples[1][channel] + + u32 channel_value = samples[0][channel] + samples[1][channel] + samples[2][channel] + samples[3][channel]; dst_pixel[channel] = (channel_value + 2) / 4; } diff --git a/Source/Core/VideoCommon/TextureConversionShader.cpp b/Source/Core/VideoCommon/TextureConversionShader.cpp index 6962daa29b..29bffe8995 100644 --- a/Source/Core/VideoCommon/TextureConversionShader.cpp +++ b/Source/Core/VideoCommon/TextureConversionShader.cpp @@ -523,10 +523,10 @@ UBO_BINDING(std140, 1) uniform UBO { #if defined(API_METAL) #if defined(TEXEL_BUFFER_FORMAT_R8) - SSBO_BINDING(0) readonly buffer Input { uint8_t s_input_buffer[]; }; + SSBO_BINDING(0) readonly buffer Input { u8 s_input_buffer[]; }; #define FETCH(offset) uint(s_input_buffer[offset]) #elif defined(TEXEL_BUFFER_FORMAT_R16) - SSBO_BINDING(0) readonly buffer Input { uint16_t s_input_buffer[]; }; + SSBO_BINDING(0) readonly buffer Input { u16 s_input_buffer[]; }; #define FETCH(offset) uint(s_input_buffer[offset]) #elif defined(TEXEL_BUFFER_FORMAT_RGBA8) SSBO_BINDING(0) readonly buffer Input { u8vec4 s_input_buffer[]; }; @@ -539,7 +539,7 @@ UBO_BINDING(std140, 1) uniform UBO { #endif #ifdef HAS_PALETTE - SSBO_BINDING(1) readonly buffer Palette { uint16_t s_palette_buffer[]; }; + SSBO_BINDING(1) readonly buffer Palette { u16 s_palette_buffer[]; }; #define FETCH_PALETTE(offset) uint(s_palette_buffer[offset]) #endif @@ -1181,7 +1181,7 @@ float4 DecodePixel(int val) ss << "\n"; if (api_type == APIType::Metal) - ss << "SSBO_BINDING(0) readonly buffer Palette { uint16_t palette[]; };\n"; + ss << "SSBO_BINDING(0) readonly buffer Palette { u16 palette[]; };\n"; else ss << "TEXEL_BUFFER_BINDING(0) uniform usamplerBuffer samp0;\n"; ss << "SAMPLER_BINDING(1) uniform sampler2DArray samp1;\n";