docstring stringlengths 22 576 | signature stringlengths 9 317 | prompt stringlengths 57 886 | code stringlengths 20 1.36k | repository stringclasses 49
values | language stringclasses 2
values | license stringclasses 9
values | stars int64 15 21.3k |
|---|---|---|---|---|---|---|---|
/* Set the locktime of a neighbour table to the specified value */ | void rtnl_neightbl_set_locktime(struct rtnl_neightbl *ntbl, uint64_t ms) | /* Set the locktime of a neighbour table to the specified value */
void rtnl_neightbl_set_locktime(struct rtnl_neightbl *ntbl, uint64_t ms) | {
ntbl->nt_parms.ntp_locktime = ms;
ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_LOCKTIME;
ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS;
} | seemoo-lab/nexmon | C++ | GNU General Public License v3.0 | 2,330 |
/* Change the mode of the USB controller to host. */ | void USBHostMode(unsigned long ulBase) | /* Change the mode of the USB controller to host. */
void USBHostMode(unsigned long ulBase) | {
ASSERT(ulBase == USB0_BASE);
HWREGB(ulBase + USB_O_GPCS) = USB_GPCS_DEVMODOTG;
} | feaser/openblt | C++ | GNU General Public License v3.0 | 601 |
/* Release the backing device of a uwb_rc that has been dynamically allocated. */ | static void uwb_rc_sys_release(struct device *dev) | /* Release the backing device of a uwb_rc that has been dynamically allocated. */
static void uwb_rc_sys_release(struct device *dev) | {
struct uwb_dev *uwb_dev = container_of(dev, struct uwb_dev, dev);
struct uwb_rc *rc = container_of(uwb_dev, struct uwb_rc, uwb_dev);
uwb_rc_ie_release(rc);
kfree(rc);
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* ixgbe_set_vmdq_82599 - Associate a VMDq pool index with a rx address @hw: pointer to hardware struct @rar: receive address register index to associate with a VMDq index @vmdq: VMDq pool index */ | static s32 ixgbe_set_vmdq_82599(struct ixgbe_hw *hw, u32 rar, u32 vmdq) | /* ixgbe_set_vmdq_82599 - Associate a VMDq pool index with a rx address @hw: pointer to hardware struct @rar: receive address register index to associate with a VMDq index @vmdq: VMDq pool index */
static s32 ixgbe_set_vmdq_82599(struct ixgbe_hw *hw, u32 rar, u32 vmdq) | {
u32 mpsar;
u32 rar_entries = hw->mac.num_rar_entries;
if (rar < rar_entries) {
if (vmdq < 32) {
mpsar = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));
mpsar |= 1 << vmdq;
IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), mpsar);
} else {
mpsar = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));
mpsar |= 1 << (vmdq - 32... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Called by nand_init_chip to initialize the board specific functions */ | void board_nand_init(void) | /* Called by nand_init_chip to initialize the board specific functions */
void board_nand_init(void) | {
struct misc_regs *const misc_regs_p =
(struct misc_regs *)CONFIG_SPEAR_MISCBASE;
struct nand_chip *nand = &nand_chip[0];
if (!(readl(&misc_regs_p->auto_cfg_reg) & MISC_NANDDIS))
fsmc_nand_init(nand);
} | 4ms/stm32mp1-baremetal | C++ | Other | 137 |
/* Completes the Map() operation and releases any corresponding resources. */ | VOID IoMmuUnmap(IN EDKII_IOMMU_PPI *IoMmu, IN VOID *Mapping) | /* Completes the Map() operation and releases any corresponding resources. */
VOID IoMmuUnmap(IN EDKII_IOMMU_PPI *IoMmu, IN VOID *Mapping) | {
if (IoMmu != NULL) {
IoMmu->SetAttribute (IoMmu, Mapping, 0);
IoMmu->Unmap (IoMmu, Mapping);
}
} | tianocore/edk2 | C++ | Other | 4,240 |
/* If ExtendeVerification is TRUE, then perform dependent serial device reset, and set display mode to mode 0. If ExtendedVerification is FALSE, only set display mode to mode 0. */ | EFI_STATUS EFIAPI TerminalConOutReset(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN BOOLEAN ExtendedVerification) | /* If ExtendeVerification is TRUE, then perform dependent serial device reset, and set display mode to mode 0. If ExtendedVerification is FALSE, only set display mode to mode 0. */
EFI_STATUS EFIAPI TerminalConOutReset(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN BOOLEAN ExtendedVerification) | {
EFI_STATUS Status;
TERMINAL_DEV *TerminalDevice;
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
if (ExtendedVerification) {
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
EFI_PROGRESS_CODE,
(EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_PC_RESET),
TerminalDevice->DevicePath
);
Stat... | tianocore/edk2 | C++ | Other | 4,240 |
/* This function handles the HSE ready detection (called in RCC_IRQHandler) */ | void HSEReady_Callback(void) | /* This function handles the HSE ready detection (called in RCC_IRQHandler) */
void HSEReady_Callback(void) | {
LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_HSE);
LL_Init1msTick(HSE_VALUE);
} | STMicroelectronics/STM32CubeF4 | C++ | Other | 789 |
/* returns non zero if we are currently processing or setup to process a header. */ | int iscsi_tcp_recv_segment_is_hdr(struct iscsi_tcp_conn *tcp_conn) | /* returns non zero if we are currently processing or setup to process a header. */
int iscsi_tcp_recv_segment_is_hdr(struct iscsi_tcp_conn *tcp_conn) | {
return tcp_conn->in.segment.done == iscsi_tcp_hdr_recv_done;
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* adjusting the clock frequency only in fine update mode */ | void enet_ptp_timestamp_addend_config(uint32_t add) | /* adjusting the clock frequency only in fine update mode */
void enet_ptp_timestamp_addend_config(uint32_t add) | {
ENET_PTP_TSADDEND = add;
} | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* Wrap MFXSTM32L152 read function to Bus IO function. */ | static int32_t MFXSTM32L152_ReadRegWrap(void *handle, uint16_t Reg, uint8_t *pData, uint16_t Length) | /* Wrap MFXSTM32L152 read function to Bus IO function. */
static int32_t MFXSTM32L152_ReadRegWrap(void *handle, uint16_t Reg, uint8_t *pData, uint16_t Length) | {
MFXSTM32L152_Object_t *pObj = (MFXSTM32L152_Object_t *)handle;
return pObj->IO.ReadReg(pObj->IO.Address, Reg, pData, Length);
} | eclipse-threadx/getting-started | C++ | Other | 310 |
/* Get the DMA channel Interrupt Callback function that have been set. */ | xtEventCallback DMAChannelIntCallbackGet(unsigned long ulChannelID) | /* Get the DMA channel Interrupt Callback function that have been set. */
xtEventCallback DMAChannelIntCallbackGet(unsigned long ulChannelID) | {
int i;
xASSERT(xDMAChannelIDValid(ulChannelID));
for(i = 0; g_psDMAChannelAssignTable[i].ulChannelID !=
xDMA_CHANNEL_NOT_EXIST;
i++)
{
if(g_psDMAChannelAssignTable[i].ulChannelID == ulChannelID)
{
return g_psDMAChannelAssignTable[i].pfnDMAChannelH... | coocox/cox | C++ | Berkeley Software Distribution (BSD) | 104 |
/* Get Sign, NaturalUnits, and ConstantUnits of the WORD data. */ | BOOLEAN EdbGetNaturalIndex16(IN UINT16 Data16, OUT UINTN *NaturalUnits, OUT UINTN *ConstantUnits) | /* Get Sign, NaturalUnits, and ConstantUnits of the WORD data. */
BOOLEAN EdbGetNaturalIndex16(IN UINT16 Data16, OUT UINTN *NaturalUnits, OUT UINTN *ConstantUnits) | {
BOOLEAN Sign;
UINTN NaturalUnitBit;
Sign = (BOOLEAN)(Data16 >> 15);
NaturalUnitBit = (UINTN)((Data16 >> 12) & 0x7);
NaturalUnitBit *= 2;
Data16 = Data16 & 0xFFF;
*NaturalUnits = (UINTN)(Data16 & ((1 << NaturalUnitBit) - 1));
*ConstantUnits = (UINTN)((Data16 >> NaturalUnitBi... | tianocore/edk2 | C++ | Other | 4,240 |
/* Compare two certificates: they must be identical for this to work. NB: Although "cmp" operations are generally prototyped to take "const" arguments (eg. for use in STACKs), the way X509 handling is - these operations may involve ensuring the hashes are up-to-date and ensuring certain cert information is cached. So t... | int X509_cmp(const X509 *a, const X509 *b) | /* Compare two certificates: they must be identical for this to work. NB: Although "cmp" operations are generally prototyped to take "const" arguments (eg. for use in STACKs), the way X509 handling is - these operations may involve ensuring the hashes are up-to-date and ensuring certain cert information is cached. So t... | {
int rv;
X509_check_purpose((X509 *)a, -1, 0);
X509_check_purpose((X509 *)b, -1, 0);
rv = memcmp(a->sha1_hash, b->sha1_hash, SHA_DIGEST_LENGTH);
if (rv)
return rv;
if (!a->cert_info->enc.modified && !b->cert_info->enc.modified) {
rv = (int)(a->cert_info->enc.len - b->cert_info->... | seemoo-lab/nexmon | C++ | GNU General Public License v3.0 | 2,330 |
/* Read a single byte from the serial port. Returns 1 on success, 0 otherwise. When the function is succesfull, the character read is written into its argument c. */ | int serial_tstc(void) | /* Read a single byte from the serial port. Returns 1 on success, 0 otherwise. When the function is succesfull, the character read is written into its argument c. */
int serial_tstc(void) | {
return (UTRSTAT0 & 0x01);
} | EmcraftSystems/u-boot | C++ | Other | 181 |
/* This function is called to determine whether the BSP is compatible with the supplied device-tree, which is assumed to be the correct one for the actual board. It is expected thati, in the future, a kernel may support multiple boards. */ | static int __init gef_sbc310_probe(void) | /* This function is called to determine whether the BSP is compatible with the supplied device-tree, which is assumed to be the correct one for the actual board. It is expected thati, in the future, a kernel may support multiple boards. */
static int __init gef_sbc310_probe(void) | {
unsigned long root = of_get_flat_dt_root();
if (of_flat_dt_is_compatible(root, "gef,sbc310"))
return 1;
return 0;
} | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* I-Am-Request ::= SEQUENCE { aAmDeviceIdentifier BACnetObjectIdentifier, maxAPDULengthAccepted Unsigned, segmentationSupported BACnetSegmentation, vendorID Unsigned } */ | static guint fIAmRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) | /* I-Am-Request ::= SEQUENCE { aAmDeviceIdentifier BACnetObjectIdentifier, maxAPDULengthAccepted Unsigned, segmentationSupported BACnetSegmentation, vendorID Unsigned } */
static guint fIAmRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) | {
offset = fApplicationTypes(tvb, pinfo, tree, offset, "BACnet Object Identifier: ");
offset = fApplicationTypes(tvb, pinfo, tree, offset, "Maximum ADPU Length Accepted: ");
offset = fApplicationTypesEnumerated(tvb, pinfo, tree, offset,
"Segmentation Supported: ", BACnetSegmentation);
return fVe... | seemoo-lab/nexmon | C++ | GNU General Public License v3.0 | 2,330 |
/* Directs the Protocol Layer to perform a hard reset. This function is called from the Policy Engine. */ | void prl_execute_hard_reset(const struct device *dev) | /* Directs the Protocol Layer to perform a hard reset. This function is called from the Policy Engine. */
void prl_execute_hard_reset(const struct device *dev) | {
struct usbc_port_data *data = dev->data;
struct protocol_hard_reset_t *prl_hr = data->prl_hr;
if (prl_is_running(dev) == false) {
return;
}
atomic_set_bit(&prl_hr->flags, PRL_FLAGS_PE_HARD_RESET);
prl_hr_set_state(dev, PRL_HR_RESET_LAYER);
} | zephyrproject-rtos/zephyr | C++ | Apache License 2.0 | 9,573 |
/* Sets the period value used by a PWM channel. This function writes directly to the CPRD register if the channel is disabled; otherwise, it uses the update register CUPD. */ | void PWMC_SetPeriod(unsigned char channel, unsigned short period) | /* Sets the period value used by a PWM channel. This function writes directly to the CPRD register if the channel is disabled; otherwise, it uses the update register CUPD. */
void PWMC_SetPeriod(unsigned char channel, unsigned short period) | {
if ((AT91C_BASE_PWMC->PWMC_SR & (1 << channel)) == 0) {
AT91C_BASE_PWMC->PWMC_CH[channel].PWMC_CPRDR = period;
}
else {
AT91C_BASE_PWMC->PWMC_CH[channel].PWMC_CMR |= AT91C_PWMC_CPD;
AT91C_BASE_PWMC->PWMC_CH[channel].PWMC_CUPDR = period;
}
} | apopple/Pandaboard-FreeRTOS | C++ | null | 25 |
/* System shutdown handler. Turn off the watchdog if we're restarting or halting the system. */ | static void mpcore_wdt_shutdown(struct platform_device *dev) | /* System shutdown handler. Turn off the watchdog if we're restarting or halting the system. */
static void mpcore_wdt_shutdown(struct platform_device *dev) | {
struct mpcore_wdt *wdt = platform_get_drvdata(dev);
if (system_state == SYSTEM_RESTART || system_state == SYSTEM_HALT)
mpcore_wdt_stop(wdt);
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Switch a Z8530 into synchronous mode without DMA assist. We raise the RTS/DTR and commence network operation. */ | int z8530_sync_open(struct net_device *dev, struct z8530_channel *c) | /* Switch a Z8530 into synchronous mode without DMA assist. We raise the RTS/DTR and commence network operation. */
int z8530_sync_open(struct net_device *dev, struct z8530_channel *c) | {
unsigned long flags;
spin_lock_irqsave(c->lock, flags);
c->sync = 1;
c->mtu = dev->mtu+64;
c->count = 0;
c->skb = NULL;
c->skb2 = NULL;
c->irqs = &z8530_sync;
z8530_rx_done(c);
z8530_rx_done(c);
z8530_rtsdtr(c,1);
c->dma_tx = 0;
c->regs[R1]|=TxINT_ENAB;
write_zsreg(c, R1, c->regs[R1]);
write_zsreg(c, R... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* If 32-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 32-bit boundary, then ASSERT(). If StartBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). */ | UINT32 EFIAPI MmioBitFieldRead32(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit) | /* If 32-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 32-bit boundary, then ASSERT(). If StartBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). */
UINT32 EFIAPI MmioBitFieldRead32(IN UINTN ... | {
return BitFieldRead32 (MmioRead32 (Address), StartBit, EndBit);
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Derive SHA256 HMAC-based Extract Key Derivation Function (HKDF). */ | BOOLEAN EFIAPI HkdfSha256Extract(IN CONST UINT8 *Key, IN UINTN KeySize, IN CONST UINT8 *Salt, IN UINTN SaltSize, OUT UINT8 *PrkOut, IN UINTN PrkOutSize) | /* Derive SHA256 HMAC-based Extract Key Derivation Function (HKDF). */
BOOLEAN EFIAPI HkdfSha256Extract(IN CONST UINT8 *Key, IN UINTN KeySize, IN CONST UINT8 *Salt, IN UINTN SaltSize, OUT UINT8 *PrkOut, IN UINTN PrkOutSize) | {
return HkdfMdExtract (MBEDTLS_MD_SHA256, Key, KeySize, Salt, SaltSize, PrkOut, PrkOutSize);
} | tianocore/edk2 | C++ | Other | 4,240 |
/* FreeRTOS hook (or callback) functions that are defined in this file. */ | void vApplicationMallocFailedHook(void) | /* FreeRTOS hook (or callback) functions that are defined in this file. */
void vApplicationMallocFailedHook(void) | {
taskDISABLE_INTERRUPTS();
for (;;) {
}
} | remotemcu/remcu-chip-sdks | C++ | null | 436 |
/* Sets the RTC BCD calendar day value.
Requires unlocking the RTC write-protection (RTC_WPR) */ | void rtc_calendar_set_day(uint8_t day) | /* Sets the RTC BCD calendar day value.
Requires unlocking the RTC write-protection (RTC_WPR) */
void rtc_calendar_set_day(uint8_t day) | {
uint8_t bcd_day = _rtc_dec_to_bcd(day);
RTC_DR &= ~(RTC_DR_DT_MASK << RTC_DR_DT_SHIFT | RTC_DR_DU_MASK << RTC_DR_DU_SHIFT);
RTC_DR |= (((bcd_day >> 4) & RTC_DR_DT_MASK) << RTC_DR_DT_SHIFT) |
((bcd_day & RTC_DR_DU_MASK) << RTC_DR_DU_SHIFT);
} | libopencm3/libopencm3 | C++ | GNU General Public License v3.0 | 2,931 |
/* Modifies or resets the current station address, if supported. */ | EFI_STATUS WinNtSnpStationAddress(IN EMU_SNP_PROTOCOL *This, IN BOOLEAN Reset, IN EFI_MAC_ADDRESS *New OPTIONAL) | /* Modifies or resets the current station address, if supported. */
EFI_STATUS WinNtSnpStationAddress(IN EMU_SNP_PROTOCOL *This, IN BOOLEAN Reset, IN EFI_MAC_ADDRESS *New OPTIONAL) | {
WIN_NT_SNP_PRIVATE *Private;
Private = WIN_NT_SNP_PRIVATE_DATA_FROM_THIS (This);
return EFI_UNSUPPORTED;
} | tianocore/edk2 | C++ | Other | 4,240 |
/* clear packets scheduled for sending on a specific interface */ | static void _mdns_clear_pcb_tx_queue_head(tcpip_adapter_if_t tcpip_if, mdns_ip_protocol_t ip_protocol) | /* clear packets scheduled for sending on a specific interface */
static void _mdns_clear_pcb_tx_queue_head(tcpip_adapter_if_t tcpip_if, mdns_ip_protocol_t ip_protocol) | {
mdns_tx_packet_t * q, * p;
while (_mdns_server->tx_queue_head && _mdns_server->tx_queue_head->tcpip_if == tcpip_if && _mdns_server->tx_queue_head->ip_protocol == ip_protocol) {
q = _mdns_server->tx_queue_head;
_mdns_server->tx_queue_head = _mdns_server->tx_queue_head->next;
_mdns_free_... | retro-esp32/RetroESP32 | C++ | Creative Commons Attribution Share Alike 4.0 International | 581 |
/* Reads the ST25DV ITtime duration for the GPO pulses. */ | int32_t BSP_NFCTAG_ReadITPulse(uint32_t Instance, ST25DV_PULSE_DURATION *const pITtime) | /* Reads the ST25DV ITtime duration for the GPO pulses. */
int32_t BSP_NFCTAG_ReadITPulse(uint32_t Instance, ST25DV_PULSE_DURATION *const pITtime) | {
UNUSED(Instance);
return ST25DV_ReadITPulse(&NfcTagObj, pITtime);
} | eclipse-threadx/getting-started | C++ | Other | 310 |
/* Determines if the system environment state supports a capsule update. */ | EFI_STATUS EFIAPI CheckSystemEnvironment(OUT BOOLEAN *Good) | /* Determines if the system environment state supports a capsule update. */
EFI_STATUS EFIAPI CheckSystemEnvironment(OUT BOOLEAN *Good) | {
if (LookupCapsuleUpdatePolicyProtocol ()) {
return mCapsuleUpdatePolicy->CheckSystemEnvironment (mCapsuleUpdatePolicy, Good);
}
*Good = TRUE;
return EFI_SUCCESS;
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Adds a record for an execution stall on the processor into a specified boot script table. */ | RETURN_STATUS EFIAPI S3BootScriptSaveStall(IN UINTN Duration) | /* Adds a record for an execution stall on the processor into a specified boot script table. */
RETURN_STATUS EFIAPI S3BootScriptSaveStall(IN UINTN Duration) | {
UINT8 Length;
UINT8 *Script;
EFI_BOOT_SCRIPT_STALL ScriptStall;
if (!mS3BootScriptAcpiS3Enable) {
return RETURN_SUCCESS;
}
Length = (UINT8)(sizeof (EFI_BOOT_SCRIPT_STALL));
Script = S3BootScriptGetEntryAddAddress (Length);
if (Script == NULL) {
return RETURN_... | tianocore/edk2 | C++ | Other | 4,240 |
/* __cdns3_gadget_ep_clear_halt Clears stall on selected endpoint Should be called after acquiring spin_lock and selecting ep @ep: endpoint object to clear stall on */ | int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep) | /* __cdns3_gadget_ep_clear_halt Clears stall on selected endpoint Should be called after acquiring spin_lock and selecting ep @ep: endpoint object to clear stall on */
int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep) | {
struct cdns3_device *priv_dev = priv_ep->cdns3_dev;
struct usb_request *request;
int ret = 0;
int val;
trace_cdns3_halt(priv_ep, 0, 0);
writel(EP_CMD_CSTALL | EP_CMD_EPRST, &priv_dev->regs->ep_cmd);
readl_poll_timeout_atomic(&priv_dev->regs->ep_cmd, val,
!(val & EP_CMD_EPRST), 100);
if (ret)
return -E... | 4ms/stm32mp1-baremetal | C++ | Other | 137 |
/* Initializes an External Interrupt channel configuration structure to defaults.
The default configuration is as follows: */ | void extint_chan_get_config_defaults(struct extint_chan_conf *const config) | /* Initializes an External Interrupt channel configuration structure to defaults.
The default configuration is as follows: */
void extint_chan_get_config_defaults(struct extint_chan_conf *const config) | {
Assert(config);
config->gpio_pin = 0;
config->gpio_pin_mux = 0;
config->gpio_pin_pull = EXTINT_PULL_UP;
config->wake_if_sleeping = true;
config->filter_input_signal = false;
config->detection_criteria = EXTINT_DETECT_FALLING;
} | memfault/zero-to-main | C++ | null | 200 |
/* Flushes an endpoint of the Low Level Driver. */ | USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) | /* Flushes an endpoint of the Low Level Driver. */
USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) | {
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_EP_Flush(pdev->pData, ep_addr);
switch (hal_status) {
case HAL_OK :
usb_status = USBD_OK;
break;
case HAL_ERROR :
usb_status = USBD_FAIL;
break;
case HAL_BUSY :
usb_status... | feaser/openblt | C++ | GNU General Public License v3.0 | 601 |
/* DAC Channel Trigger Disable.
Disable a digital to analog converter channel external trigger. */ | void dac_trigger_disable(data_channel dac_channel) | /* DAC Channel Trigger Disable.
Disable a digital to analog converter channel external trigger. */
void dac_trigger_disable(data_channel dac_channel) | {
switch (dac_channel) {
case CHANNEL_1:
DAC_CR &= ~DAC_CR_TEN1;
break;
case CHANNEL_2:
DAC_CR &= ~DAC_CR_TEN2;
break;
case CHANNEL_D:
DAC_CR &= ~(DAC_CR_TEN1 | DAC_CR_TEN2);
break;
}
} | insane-adding-machines/unicore-mx | C++ | GNU General Public License v3.0 | 50 |
/* This function is use to set up the handle (@idp) that you will pass to the rest of the functions. */ | void idr_init(struct idr *idp) | /* This function is use to set up the handle (@idp) that you will pass to the rest of the functions. */
void idr_init(struct idr *idp) | {
memset(idp, 0, sizeof(struct idr));
spin_lock_init(&idp->lock);
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Swap the display direction. This is useful when displaying bmp files. */ | void LCD_SwapDirection(FunctionalState NewState) | /* Swap the display direction. This is useful when displaying bmp files. */
void LCD_SwapDirection(FunctionalState NewState) | {
if (NewState != DISABLE)
{
if(LCDType == LCD_HX8347D)
{
LCD_WriteReg(LCD_REG_22, 0xA0);
}
else
{
LCD_WriteReg(LCD_REG_3, 0x1008);
}
}
else
{
if(LCDType == LCD_HX8347D)
{
LCD_WriteReg(LCD_REG_22, 0xE0);
}
else
{
LCD_WriteReg(LCD_REG_3, 0x101... | avem-labs/Avem | C++ | MIT License | 1,752 |
/* This function facilitates software identification of exact version of the VTC hardware (h/w). */ | u32 XVtc_GetVersion(XVtc *InstancePtr) | /* This function facilitates software identification of exact version of the VTC hardware (h/w). */
u32 XVtc_GetVersion(XVtc *InstancePtr) | {
u32 Version;
Xil_AssertNonvoid(InstancePtr != NULL);
Version = XVtc_ReadReg(InstancePtr->Config.BaseAddress,
XVTC_VER_OFFSET);
return Version;
} | ua1arn/hftrx | C++ | null | 69 |
/* Does a software reset of the PHY by reading the PHY control register and setting/write the control register reset bit to the PHY. */ | s32 e1000e_phy_sw_reset(struct e1000_hw *hw) | /* Does a software reset of the PHY by reading the PHY control register and setting/write the control register reset bit to the PHY. */
s32 e1000e_phy_sw_reset(struct e1000_hw *hw) | {
s32 ret_val;
u16 phy_ctrl;
ret_val = e1e_rphy(hw, PHY_CONTROL, &phy_ctrl);
if (ret_val)
return ret_val;
phy_ctrl |= MII_CR_RESET;
ret_val = e1e_wphy(hw, PHY_CONTROL, phy_ctrl);
if (ret_val)
return ret_val;
udelay(1);
return ret_val;
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* sysfs_mbox_idle - frees the sysfs mailbox @phba: lpfc_hba pointer */ | static void sysfs_mbox_idle(struct lpfc_hba *phba) | /* sysfs_mbox_idle - frees the sysfs mailbox @phba: lpfc_hba pointer */
static void sysfs_mbox_idle(struct lpfc_hba *phba) | {
phba->sysfs_mbox.state = SMBOX_IDLE;
phba->sysfs_mbox.offset = 0;
if (phba->sysfs_mbox.mbox) {
mempool_free(phba->sysfs_mbox.mbox,
phba->mbox_mem_pool);
phba->sysfs_mbox.mbox = NULL;
}
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Object remove response. Just says that remove request has been received. Used in cache coherency protocol. */ | static int pohmelfs_remove_response(struct netfs_state *st) | /* Object remove response. Just says that remove request has been received. Used in cache coherency protocol. */
static int pohmelfs_remove_response(struct netfs_state *st) | {
struct netfs_cmd *cmd = &st->cmd;
int err;
err = pohmelfs_data_recv_and_check(st, st->data, cmd->size);
if (err)
return err;
dprintk("%s: parent: %llu, path: '%s'.\n", __func__, cmd->id, (char *)st->data);
return 0;
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Exit SPI Flash Low power mode.
Exit SPI Flash Low power mode */ | void spi_flash_leave_low_power_mode(void) | /* Exit SPI Flash Low power mode.
Exit SPI Flash Low power mode */
void spi_flash_leave_low_power_mode(void) | {
SPI_FLASH0->READ_CTRL.reg = SPI_FLASH_READ_CTRL_RDATA_COUNT(0x0);
SPI_FLASH0->CMD_BUFFER0.reg = SPI_FLASH_CMD_LEAVE_LOW_POWER;
SPI_FLASH0->DIRECTION.reg = SPI_FLASH_DIRECTION_CMD;
SPI_FLASH0->DMA_START_ADDRESS.reg = 0x0;
SPI_FLASH0->TRANSACTION_CTRL.reg = \
SPI_FLASH_TRANSACTION_CTRL_FLASH_TRANS_START | \
... | memfault/zero-to-main | C++ | null | 200 |
/* Print all protocol names supported for a specific layer type. table_name contains the layer type name in which the search is performed. We send the output to the stream described by the handle output. */ | static void fprint_all_protocols_for_layer_types(FILE *output, gchar *table_name) | /* Print all protocol names supported for a specific layer type. table_name contains the layer type name in which the search is performed. We send the output to the stream described by the handle output. */
static void fprint_all_protocols_for_layer_types(FILE *output, gchar *table_name) | {
prev_display_dissector_name = NULL;
dissector_table_foreach_handle(table_name,
display_dissector_names,
(gpointer)output);
} | seemoo-lab/nexmon | C++ | GNU General Public License v3.0 | 2,330 |
/* Worker function to switch the requested AP to be the BSP from that point onward. */ | VOID SwitchNewBsp(IN UINTN ProcessorNumber) | /* Worker function to switch the requested AP to be the BSP from that point onward. */
VOID SwitchNewBsp(IN UINTN ProcessorNumber) | {
EFI_STATUS Status;
EFI_MP_SERVICES_PROTOCOL *MpServices;
CPU_FEATURES_DATA *CpuFeaturesData;
CpuFeaturesData = GetCpuFeaturesData ();
MpServices = CpuFeaturesData->MpService.Protocol;
Status = MpServices->SwitchBSP (
MpServices,
... | tianocore/edk2 | C++ | Other | 4,240 |
/* Write the seed value for CRC operations in the EC module. */ | void CRCSeedSet(uint32_t ui32Base, uint32_t ui32Seed) | /* Write the seed value for CRC operations in the EC module. */
void CRCSeedSet(uint32_t ui32Base, uint32_t ui32Seed) | {
ASSERT(ui32Base == CCM0_BASE);
HWREG(ui32Base + CCM_O_CRCSEED) = ui32Seed;
} | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* ‘p n’ Reads the n-th register's value into an output buffer and sends it as a packet */ | VOID EFIAPI ReadNthRegister(IN EFI_SYSTEM_CONTEXT SystemContext, IN CHAR8 *InBuffer) | /* ‘p n’ Reads the n-th register's value into an output buffer and sends it as a packet */
VOID EFIAPI ReadNthRegister(IN EFI_SYSTEM_CONTEXT SystemContext, IN CHAR8 *InBuffer) | {
UINTN RegNumber;
CHAR8 OutBuffer[9];
CHAR8 *OutBufPtr;
RegNumber = AsciiStrHexToUintn (&InBuffer[1]);
if ((RegNumber < 0) || (RegNumber >= MaxRegisterCount ())) {
SendError (GDB_EINVALIDREGNUM);
return;
}
OutBufPtr = OutBuffer;
OutBufPtr = BasicReadRegister (SystemContext, RegNumber, OutBuf... | tianocore/edk2 | C++ | Other | 4,240 |
/* This function is used for copying 32 bit to stream while converting to little endian format.
UINT32_TO_STREAM_f */ | UINT8* UINT32_TO_STREAM_f(UINT8 *p, UINT32 u32) | /* This function is used for copying 32 bit to stream while converting to little endian format.
UINT32_TO_STREAM_f */
UINT8* UINT32_TO_STREAM_f(UINT8 *p, UINT32 u32) | {
*(p)++ = (UINT8)(u32);
*(p)++ = (UINT8)((u32) >> 8);
*(p)++ = (UINT8)((u32) >> 16);
*(p)++ = (UINT8)((u32) >> 24);
return p;
} | alibaba/AliOS-Things | C++ | Apache License 2.0 | 4,536 |
/* It is provided just because the creation of an rpcap header is a common task. It accepts all the values that appears into an rpcap_header, and it puts them in place using the proper hton() calls. */ | void rpcap_createhdr(struct rpcap_header *header, uint8 ver, uint8 type, uint16 value, uint32 length) | /* It is provided just because the creation of an rpcap header is a common task. It accepts all the values that appears into an rpcap_header, and it puts them in place using the proper hton() calls. */
void rpcap_createhdr(struct rpcap_header *header, uint8 ver, uint8 type, uint16 value, uint32 length) | {
memset(header, 0, sizeof(struct rpcap_header));
header->ver = ver;
header->type = type;
header->value = htons(value);
header->plen = htonl(length);
} | seemoo-lab/nexmon | C++ | GNU General Public License v3.0 | 2,330 |
/* Ensures final expression result is in a valid R/K index (that is, it is either in a register or in 'k' with an index in the range of R/K indices). Returns 1 iff expression is K. */ | int luaK_exp2RK(FuncState *fs, expdesc *e) | /* Ensures final expression result is in a valid R/K index (that is, it is either in a register or in 'k' with an index in the range of R/K indices). Returns 1 iff expression is K. */
int luaK_exp2RK(FuncState *fs, expdesc *e) | {
luaK_exp2anyreg(fs, e);
return 0;
}
} | Nicholas3388/LuaNode | C++ | Other | 1,055 |
/* dispose of the old data from an updated user defined key */ | static void user_update_rcu_disposal(struct rcu_head *rcu) | /* dispose of the old data from an updated user defined key */
static void user_update_rcu_disposal(struct rcu_head *rcu) | {
struct user_key_payload *upayload;
upayload = container_of(rcu, struct user_key_payload, rcu);
kfree(upayload);
} | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* [map->virt_addr, map->virt_addr + map->length) and [virt_addr, virt_addr + length) have intersection. And the physical address in the intersection are the same. */ | static void mapping_merge(MemoryMapping *map, hwaddr virt_addr, ram_addr_t length) | /* [map->virt_addr, map->virt_addr + map->length) and [virt_addr, virt_addr + length) have intersection. And the physical address in the intersection are the same. */
static void mapping_merge(MemoryMapping *map, hwaddr virt_addr, ram_addr_t length) | {
if (virt_addr < map->virt_addr) {
map->length += map->virt_addr - virt_addr;
map->virt_addr = virt_addr;
}
if ((virt_addr + length) >
(map->virt_addr + map->length)) {
map->length = virt_addr + length - map->virt_addr;
}
} | ve3wwg/teensy3_qemu | C | Other | 15 |
/* If Address > 0x0FFFFFFF, then ASSERT(). If StartBit is greater than 7, then ASSERT(). If EndBit is greater than 7, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT(). */ | UINT8 EFIAPI PciExpressBitFieldAnd8(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData) | /* If Address > 0x0FFFFFFF, then ASSERT(). If StartBit is greater than 7, then ASSERT(). If EndBit is greater than 7, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT(). */
UINT8 EFIAPI PciExpressBitFieldAnd8(I... | {
if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) {
return (UINT8)-1;
}
return MmioBitFieldAnd8 (
GetPciExpressAddress (Address),
StartBit,
EndBit,
AndData
);
} | tianocore/edk2 | C++ | Other | 4,240 |
/* free what has been allocated by avcodec_thread_init(). must be called after decoding has finished, especially do not call while avcodec_thread_execute() is running */ | void avcodec_thread_free(AVCodecContext *s) | /* free what has been allocated by avcodec_thread_init(). must be called after decoding has finished, especially do not call while avcodec_thread_execute() is running */
void avcodec_thread_free(AVCodecContext *s) | {
c[i].func= NULL;
DosPostEventSem(c[i].work_sem);
DosWaitThread((PTID)&c[i].thread,DCWW_WAIT);
if(c[i].work_sem) DosCloseEventSem(c[i].work_sem);
if(c[i].done_sem) DosCloseEventSem(c[i].done_sem);
}
av_freep(&s->thread_opaque);
} | DC-SWAT/DreamShell | C++ | null | 404 |
/* Disables slave mode to clock the prescaler directly with the internal clock. */ | void TimerInternalClkConfigure(unsigned long ulBase) | /* Disables slave mode to clock the prescaler directly with the internal clock. */
void TimerInternalClkConfigure(unsigned long ulBase) | {
xASSERT((ulBase == TIMER1_BASE) || (ulBase == TIMER0_BASE));
xHWREG(ulBase + TIMER_MDCFR) &= ~TIMER_MDCFR_SMSEL_M;
} | coocox/cox | C++ | Berkeley Software Distribution (BSD) | 104 |
/* s e t I n f e a s i b i l i t y F l a g */ | returnValue QProblemB_setInfeasibilityFlag(QProblemB *_THIS, returnValue returnvalue, BooleanType doThrowError) | /* s e t I n f e a s i b i l i t y F l a g */
returnValue QProblemB_setInfeasibilityFlag(QProblemB *_THIS, returnValue returnvalue, BooleanType doThrowError) | {
_THIS->infeasible = BT_TRUE;
if ( ( doThrowError == BT_TRUE ) || ( _THIS->options.enableFarBounds == BT_FALSE ) )
THROWERROR( returnvalue );
return returnvalue;
} | DanielMartensson/EmbeddedLapack | C++ | MIT License | 129 |
/* param base USART peripheral base address. param handle USART handle pointer. param count Send bytes count. retval kStatus_NoTransferInProgress No send in progress. retval kStatus_InvalidArgument Parameter is invalid. retval kStatus_Success Get successfully through the parameter */ | status_t USART_TransferGetSendCount(USART_Type *base, usart_handle_t *handle, uint32_t *count) | /* param base USART peripheral base address. param handle USART handle pointer. param count Send bytes count. retval kStatus_NoTransferInProgress No send in progress. retval kStatus_InvalidArgument Parameter is invalid. retval kStatus_Success Get successfully through the parameter */
status_t USART_TransferGetSendCoun... | {
assert(NULL != handle);
assert(NULL != count);
if ((uint8_t)kUSART_TxIdle == handle->txState)
{
return kStatus_NoTransferInProgress;
}
*count = handle->txDataSizeAll - handle->txDataSize -
((base->FIFOSTAT & USART_FIFOSTAT_TXLVL_MASK) >> USART_FIFOSTAT_TXLVL_SHIFT);
re... | ARMmbed/DAPLink | C++ | Apache License 2.0 | 2,140 |
/* main DMABRG irq handler. It acks irqs and then handles every set and unmasked bit sequentially. No locking and no validity checks; it should be as fast as possible (audio!) */ | static irqreturn_t dmabrg_irq(int irq, void *data) | /* main DMABRG irq handler. It acks irqs and then handles every set and unmasked bit sequentially. No locking and no validity checks; it should be as fast as possible (audio!) */
static irqreturn_t dmabrg_irq(int irq, void *data) | {
unsigned long dcr;
unsigned int i;
dcr = ctrl_inl(DMABRGCR);
ctrl_outl(dcr & ~0x00ff0003, DMABRGCR);
dcr &= dcr >> 8;
if (dcr & 1)
dmabrg_call_handler(DMABRGIRQ_USBDMA);
if (dcr & 2)
dmabrg_call_handler(DMABRGIRQ_USBDMAERR);
dcr >>= 16;
while (dcr) {
i = __ffs(dcr);
dcr &= dcr - 1;
dmabrg_call_hand... | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* Internal Function:Poll for status of interrupt received by the Controller. */ | static uint32_t lpddr4_pollctlirq(const lpddr4_privatedata *pd, lpddr4_ctlinterrupt irqbit, uint32_t delay) | /* Internal Function:Poll for status of interrupt received by the Controller. */
static uint32_t lpddr4_pollctlirq(const lpddr4_privatedata *pd, lpddr4_ctlinterrupt irqbit, uint32_t delay) | {
uint32_t result = 0U;
uint32_t timeout = 0U;
bool irqstatus = false;
do {
if (++timeout == delay) {
result = EIO;
break;
}
result = lpddr4_checkctlinterrupt(pd, irqbit, &irqstatus);
} while ((irqstatus == false) && (result == (uint32_t) CDN_EOK));
return result;
} | 4ms/stm32mp1-baremetal | C++ | Other | 137 |
/* Scale schedule slice based on io priority. Use the sync time slice only if a queue is marked sync and has sync io queued. A sync queue with async io only, should not get full sync slice length. */ | static int cfq_prio_slice(struct cfq_data *cfqd, bool sync, unsigned short prio) | /* Scale schedule slice based on io priority. Use the sync time slice only if a queue is marked sync and has sync io queued. A sync queue with async io only, should not get full sync slice length. */
static int cfq_prio_slice(struct cfq_data *cfqd, bool sync, unsigned short prio) | {
const int base_slice = cfqd->cfq_slice[sync];
WARN_ON(prio >= IOPRIO_BE_NR);
return base_slice + (base_slice/CFQ_SLICE_SCALE * (4 - prio));
} | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* Note: Variables are assumed to be in same storage. The set sequence of Variables will be same with the sequence of VariableEntry from argument list, so follow the argument sequence to check the Variables. */ | BOOLEAN EFIAPI VariableExLibCheckRemainingSpaceForConsistency(IN UINT32 Attributes,...) | /* Note: Variables are assumed to be in same storage. The set sequence of Variables will be same with the sequence of VariableEntry from argument list, so follow the argument sequence to check the Variables. */
BOOLEAN EFIAPI VariableExLibCheckRemainingSpaceForConsistency(IN UINT32 Attributes,...) | {
VA_LIST Marker;
BOOLEAN Return;
VA_START (Marker, Attributes);
Return = CheckRemainingSpaceForConsistencyInternal (Attributes, Marker);
VA_END (Marker);
return Return;
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Find the GPU to use with our display controller. */ | static int vmlfb_get_gpu(struct vml_par *par) | /* Find the GPU to use with our display controller. */
static int vmlfb_get_gpu(struct vml_par *par) | {
mutex_lock(&vml_mutex);
par->gpu = pci_get_device(PCI_VENDOR_ID_INTEL, VML_DEVICE_GPU, NULL);
if (!par->gpu) {
mutex_unlock(&vml_mutex);
return -ENODEV;
}
mutex_unlock(&vml_mutex);
if (pci_enable_device(par->gpu) < 0)
return -ENODEV;
return 0;
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Covert the external timing nanosecond to internal clock cycle. */ | static uint8_t SEMC_ConvertTiming(uint32_t time_ns, uint32_t clkSrc_Hz) | /* Covert the external timing nanosecond to internal clock cycle. */
static uint8_t SEMC_ConvertTiming(uint32_t time_ns, uint32_t clkSrc_Hz) | {
assert(clkSrc_Hz > 0x00UL);
uint8_t clockCycles = 0;
uint32_t tClk_us;
clkSrc_Hz /= 1000000UL;
tClk_us = 1000000UL / clkSrc_Hz;
while ((tClk_us * clockCycles) < (time_ns * 1000UL))
{
clockCycles++;
}
return (clockCycles - 1U);
} | eclipse-threadx/getting-started | C++ | Other | 310 |
/* dispose of a keyring list after the RCU grace period, releasing the keys it links to */ | static void keyring_clear_rcu_disposal(struct rcu_head *rcu) | /* dispose of a keyring list after the RCU grace period, releasing the keys it links to */
static void keyring_clear_rcu_disposal(struct rcu_head *rcu) | {
struct keyring_list *klist;
int loop;
klist = container_of(rcu, struct keyring_list, rcu);
for (loop = klist->nkeys - 1; loop >= 0; loop--)
key_put(klist->keys[loop]);
kfree(klist);
} | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* This also sets the process group id used to identify the controlling process (eg. the owning automount(8) daemon). */ | static int autofs_dev_ioctl_setpipefd(struct file *fp, struct autofs_sb_info *sbi, struct autofs_dev_ioctl *param) | /* This also sets the process group id used to identify the controlling process (eg. the owning automount(8) daemon). */
static int autofs_dev_ioctl_setpipefd(struct file *fp, struct autofs_sb_info *sbi, struct autofs_dev_ioctl *param) | {
int pipefd;
int err = 0;
if (param->setpipefd.pipefd == -1)
return -EINVAL;
pipefd = param->setpipefd.pipefd;
mutex_lock(&sbi->wq_mutex);
if (!sbi->catatonic) {
mutex_unlock(&sbi->wq_mutex);
return -EBUSY;
} else {
struct file *pipe = fget(pipefd);
if (!pipe->f_op || !pipe->f_op->write) {
err = -E... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Clears or safeguards the OCREF2 signal on an external event. */ | void TIM_ClearOC2Ref(TIM_TypeDef *TIMx, uint16_t TIM_OCClear) | /* Clears or safeguards the OCREF2 signal on an external event. */
void TIM_ClearOC2Ref(TIM_TypeDef *TIMx, uint16_t TIM_OCClear) | {
uint32_t tmpccmr1 = 0;
assert_param(IS_TIM_LIST2_PERIPH(TIMx));
assert_param(IS_TIM_OCCLEAR_STATE(TIM_OCClear));
tmpccmr1 = TIMx->CCMR1;
tmpccmr1 &= (uint32_t)~TIM_CCMR1_OC2CE;
tmpccmr1 |= (uint32_t)(TIM_OCClear << 8);
TIMx->CCMR1 = tmpccmr1;
} | ajhc/demo-cortex-m3 | C++ | null | 38 |
/* Return the relative path of a possible device node. Non-default names may need to allocate a memory to compose a name. This memory is returned in tmp and needs to be freed by the caller. */ | const char* device_get_devnode(struct device *dev, mode_t *mode, const char **tmp) | /* Return the relative path of a possible device node. Non-default names may need to allocate a memory to compose a name. This memory is returned in tmp and needs to be freed by the caller. */
const char* device_get_devnode(struct device *dev, mode_t *mode, const char **tmp) | {
char *s;
*tmp = NULL;
if (dev->type && dev->type->devnode)
*tmp = dev->type->devnode(dev, mode);
if (*tmp)
return *tmp;
if (dev->class && dev->class->devnode)
*tmp = dev->class->devnode(dev, mode);
if (*tmp)
return *tmp;
if (strchr(dev_name(dev), '!') == NULL)
return dev_name(dev);
*tmp = kstrdup(de... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* match_number: scan a number in the given base from a substring_t @s: substring to be scanned */ | static int match_number(substring_t *s, int *result, int base) | /* match_number: scan a number in the given base from a substring_t @s: substring to be scanned */
static int match_number(substring_t *s, int *result, int base) | {
char *endp;
char *buf;
int ret;
buf = kmalloc(s->to - s->from + 1, GFP_KERNEL);
if (!buf)
return -ENOMEM;
memcpy(buf, s->from, s->to - s->from);
buf[s->to - s->from] = '\0';
*result = simple_strtol(buf, &endp, base);
ret = 0;
if (endp == buf)
ret = -EINVAL;
kfree(buf);
return ret;
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* This function retrieves the user readable name of a driver in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the driver name is returned in DriverName, and EFI_SUCCESS is returned. If the driver specified by This does no... | EFI_STATUS EFIAPI EmuBusDriverComponentNameGetDriverName(IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName) | /* This function retrieves the user readable name of a driver in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the driver name is returned in DriverName, and EFI_SUCCESS is returned. If the driver specified by This does no... | {
return LookupUnicodeString2 (
Language,
This->SupportedLanguages,
mEmuBusDriverNameTable,
DriverName,
(BOOLEAN)(This == &gEmuBusDriverComponentName)
);
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Flush the output text and move to the next line */ | int ecLinebreak(RTF_Context *ctx) | /* Flush the output text and move to the next line */
int ecLinebreak(RTF_Context *ctx) | {
int status;
status = ecProcessData(ctx);
if (status == ecOK)
status = ecAddLine(ctx);
return status;
} | DC-SWAT/DreamShell | C++ | null | 404 |
/* s e t u p Q P d a t a */ | returnValue QProblemB_setupQPdataM(QProblemB *_THIS, DenseMatrix *_H, const real_t *const _g, const real_t *const _lb, const real_t *const _ub) | /* s e t u p Q P d a t a */
returnValue QProblemB_setupQPdataM(QProblemB *_THIS, DenseMatrix *_H, const real_t *const _g, const real_t *const _lb, const real_t *const _ub) | {
if ( _H == 0 )
return QProblemB_setupQPdata( _THIS,(real_t*)0,_g,_lb,_ub );
else
return QProblemB_setupQPdata( _THIS,DenseMatrix_getVal(_H),_g,_lb,_ub );
} | DanielMartensson/EmbeddedLapack | C++ | MIT License | 129 |
/* Allocates the number bytes specified by AllocationSize of type EfiBootServicesData, clears the buffer with zeros, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. */ | VOID* EFIAPI AllocateZeroPool(IN UINTN AllocationSize) | /* Allocates the number bytes specified by AllocationSize of type EfiBootServicesData, clears the buffer with zeros, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. */... | {
VOID *Memory;
Memory = AllocatePool (AllocationSize);
if (Memory != NULL) {
Memory = ZeroMem (Memory, AllocationSize);
}
return Memory;
} | tianocore/edk2 | C++ | Other | 4,240 |
/* Resends the byte that failed to be received (by the Smartcard) correctly. */ | void SC_ParityErrorHandler(void) | /* Resends the byte that failed to be received (by the Smartcard) correctly. */
void SC_ParityErrorHandler(void) | {
HAL_SMARTCARD_Transmit(&SCHandle, (uint8_t *)&SCData, 1, SC_TRANSMIT_TIMEOUT);
} | STMicroelectronics/STM32CubeF4 | C++ | Other | 789 |
/* is used to stop code execution for specified time */ | void GUI_X_Delay(int ms) | /* is used to stop code execution for specified time */
void GUI_X_Delay(int ms) | {
uint32_t rtc_counter;
rtc_counter = RTC_CounterGet();
_checkForAEM();
_serveJoystick();
RTC_IntClear(RTC_IF_COMP0);
rtcFlag = true;
RTC_CompareSet(0, (rtc_counter + ((RTC_FREQ * ms ) / 1000))& _RTC_COMP0_COMP0_MASK);
RTC_Enable(true);
RTC_IntEnable(RTC_IF_COMP0);
if( (RTC_CompareGet(0)<= RTC_Count... | remotemcu/remcu-chip-sdks | C++ | null | 436 |
/* Call into both interrupt handlers, as we share the IPI for them */ | void __irq_entry smp_call_function_interrupt(void) | /* Call into both interrupt handlers, as we share the IPI for them */
void __irq_entry smp_call_function_interrupt(void) | {
irq_enter();
generic_smp_call_function_single_interrupt();
generic_smp_call_function_interrupt();
irq_exit();
} | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* set power down sleep VDDCORE gpio interrupt mask */ | BL_Err_Type PDS_Set_Vddcore_GPIO_IntClear(void) | /* set power down sleep VDDCORE gpio interrupt mask */
BL_Err_Type PDS_Set_Vddcore_GPIO_IntClear(void) | {
uint32_t tmpVal = 0;
tmpVal = BL_RD_REG(PDS_BASE, PDS_GPIO_INT);
tmpVal = BL_CLR_REG_BIT(tmpVal, PDS_GPIO_INT_CLR);
BL_WR_REG(PDS_BASE, PDS_GPIO_INT, tmpVal);
tmpVal = BL_RD_REG(PDS_BASE, PDS_GPIO_INT);
tmpVal = BL_SET_REG_BIT(tmpVal, PDS_GPIO_INT_CLR);
BL_WR_REG(PDS_BASE, PDS_GPIO_INT, tm... | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* ixgbe_msix_clean_rx - single unshared vector rx clean (all queues) @irq: unused @data: pointer to our q_vector struct for this interrupt vector */ | static irqreturn_t ixgbe_msix_clean_rx(int irq, void *data) | /* ixgbe_msix_clean_rx - single unshared vector rx clean (all queues) @irq: unused @data: pointer to our q_vector struct for this interrupt vector */
static irqreturn_t ixgbe_msix_clean_rx(int irq, void *data) | {
struct ixgbe_q_vector *q_vector = data;
struct ixgbe_adapter *adapter = q_vector->adapter;
struct ixgbe_ring *rx_ring;
int r_idx;
int i;
r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
for (i = 0; i < q_vector->rxr_count; i++) {
rx_ring = &(adapter->rx_ring[r_idx]);
rx_ring->total_byt... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Unregister a protocol driver from the arc_proto_map. Protocol drivers are responsible for registering themselves, but the unregister routine is pretty generic so we'll do it here. */ | void arcnet_unregister_proto(struct ArcProto *proto) | /* Unregister a protocol driver from the arc_proto_map. Protocol drivers are responsible for registering themselves, but the unregister routine is pretty generic so we'll do it here. */
void arcnet_unregister_proto(struct ArcProto *proto) | {
int count;
if (arc_proto_default == proto)
arc_proto_default = &arc_proto_null;
if (arc_bcast_proto == proto)
arc_bcast_proto = arc_proto_default;
if (arc_raw_proto == proto)
arc_raw_proto = arc_proto_default;
for (count = 0; count < 256; count++) {
if (arc_proto_map[count] == proto)
arc_proto_map[cou... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Clean up/close an IA. o if event handles and PD have been initialized, free them. o close the IA */ | void rpcrdma_ia_close(struct rpcrdma_ia *ia) | /* Clean up/close an IA. o if event handles and PD have been initialized, free them. o close the IA */
void rpcrdma_ia_close(struct rpcrdma_ia *ia) | {
int rc;
dprintk("RPC: %s: entering\n", __func__);
if (ia->ri_bind_mem != NULL) {
rc = ib_dereg_mr(ia->ri_bind_mem);
dprintk("RPC: %s: ib_dereg_mr returned %i\n",
__func__, rc);
}
if (ia->ri_id != NULL && !IS_ERR(ia->ri_id)) {
if (ia->ri_id->qp)
rdma_destroy_qp(ia->ri_id);
rdma_destroy_i... | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* Validate that the cooperative thread will not be preempted.
Create a cooperative thread with priority higher than the current cooperative thread. Make sure that the higher priority thread will not preempt the lower priority cooperative thread. */ | ZTEST(threads_scheduling, test_priority_cooperative) | /* Validate that the cooperative thread will not be preempted.
Create a cooperative thread with priority higher than the current cooperative thread. Make sure that the higher priority thread will not preempt the lower priority cooperative thread. */
ZTEST(threads_scheduling, test_priority_cooperative) | {
int old_prio = k_thread_priority_get(k_current_get());
last_prio = -1;
k_thread_priority_set(k_current_get(), last_prio);
int spawn_prio = last_prio - 1;
k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE,
thread_entry, NULL, NULL, NULL,
spawn_prio, 0, K_NO_WAIT);
zassert_true(last_pri... | zephyrproject-rtos/zephyr | C++ | Apache License 2.0 | 9,573 |
/* Note that rtc_irq_set_freq() should previously have been used to specify the desired frequency of periodic IRQ task->func() callbacks. */ | int rtc_irq_set_state(struct rtc_device *rtc, struct rtc_task *task, int enabled) | /* Note that rtc_irq_set_freq() should previously have been used to specify the desired frequency of periodic IRQ task->func() callbacks. */
int rtc_irq_set_state(struct rtc_device *rtc, struct rtc_task *task, int enabled) | {
int err = 0;
unsigned long flags;
if (rtc->ops->irq_set_state == NULL)
return -ENXIO;
spin_lock_irqsave(&rtc->irq_task_lock, flags);
if (rtc->irq_task != NULL && task == NULL)
err = -EBUSY;
if (rtc->irq_task != task)
err = -EACCES;
spin_unlock_irqrestore(&rtc->irq_task_lock, flags);
if (err == 0)
err ... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* This function does not return until the protection has been saved. */ | int32_t FlashProtectSave(void) | /* This function does not return until the protection has been saved. */
int32_t FlashProtectSave(void) | {
uint32_t ui32Temp;
for (ui32Temp = 0; ui32Temp < 8; ui32Temp++)
{
HWREG(FLASH_FMA) = ui32Temp;
HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT;
while (HWREG(FLASH_FMC) & FLASH_FMC_COMT)
{
}
}
return (0);
} | RT-Thread/rt-thread | C++ | Apache License 2.0 | 9,535 |
/* Checks to see of the link status of the hardware has changed. If a change in link status has been detected, then we read the PHY registers to get the current speed/duplex if link exists. */ | s32 igb_check_for_copper_link(struct e1000_hw *hw) | /* Checks to see of the link status of the hardware has changed. If a change in link status has been detected, then we read the PHY registers to get the current speed/duplex if link exists. */
s32 igb_check_for_copper_link(struct e1000_hw *hw) | {
struct e1000_mac_info *mac = &hw->mac;
s32 ret_val;
bool link;
if (!mac->get_link_status) {
ret_val = 0;
goto out;
}
ret_val = igb_phy_has_link(hw, 1, 0, &link);
if (ret_val)
goto out;
if (!link)
goto out;
mac->get_link_status = false;
igb_check_downshift(hw);
if (!mac->autoneg) {
ret_val = -E100... | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* Must be called when a user of an interface is finished with it. When the last user of the interface calls this function, the memory of the interface is freed. */ | void usb_put_intf(struct usb_interface *intf) | /* Must be called when a user of an interface is finished with it. When the last user of the interface calls this function, the memory of the interface is freed. */
void usb_put_intf(struct usb_interface *intf) | {
if (intf)
put_device(&intf->dev);
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* nfs_clear_page_tag_locked - Clear request tag and wake up sleepers */ | void nfs_clear_page_tag_locked(struct nfs_page *req) | /* nfs_clear_page_tag_locked - Clear request tag and wake up sleepers */
void nfs_clear_page_tag_locked(struct nfs_page *req) | {
if (req->wb_page != NULL) {
struct inode *inode = req->wb_context->path.dentry->d_inode;
struct nfs_inode *nfsi = NFS_I(inode);
spin_lock(&inode->i_lock);
radix_tree_tag_clear(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
nfs_unlock_request(req);
spin_unlock(&inode->i_lock);
} else
nfs_un... | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* Reads a block of data from the FSMC NOR memory. */ | void NOR_ReadBuffer(uint16_t *pBuffer, uint32_t ReadAddr, uint32_t NumHalfwordToRead) | /* Reads a block of data from the FSMC NOR memory. */
void NOR_ReadBuffer(uint16_t *pBuffer, uint32_t ReadAddr, uint32_t NumHalfwordToRead) | {
NOR_WRITE(ADDR_SHIFT(0x0555), 0x00AA);
NOR_WRITE(ADDR_SHIFT(0x02AA), 0x0055);
NOR_WRITE((Bank1_NOR2_ADDR + ReadAddr), 0x00F0);
for(; NumHalfwordToRead != 0x00; NumHalfwordToRead--)
{
*pBuffer++ = *(__IO uint16_t *)((Bank1_NOR2_ADDR + ReadAddr));
ReadAddr = ReadAddr + 2;
}
} | avem-labs/Avem | C++ | MIT License | 1,752 |
/* Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration of the USB device after enumeration - the device endpoints are configured and the joystick reporting task started. */ | void EVENT_USB_Device_ConfigurationChanged(void) | /* Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration of the USB device after enumeration - the device endpoints are configured and the joystick reporting task started. */
void EVENT_USB_Device_ConfigurationChanged(void) | {
bool ConfigSuccess = true;
ConfigSuccess &= Endpoint_ConfigureEndpoint(JOYSTICK_EPADDR, EP_TYPE_INTERRUPT, JOYSTICK_EPSIZE, 1);
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
} | prusa3d/Prusa-Firmware-Buddy | C++ | Other | 1,019 |
/* Perform a pagecache lookup for the matching buffer. If it's there, refresh it in the LRU and mark it as accessed. If it is not present then return NULL */ | struct buffer_head* __find_get_block(struct block_device *bdev, sector_t block, unsigned size) | /* Perform a pagecache lookup for the matching buffer. If it's there, refresh it in the LRU and mark it as accessed. If it is not present then return NULL */
struct buffer_head* __find_get_block(struct block_device *bdev, sector_t block, unsigned size) | {
struct buffer_head *bh = lookup_bh_lru(bdev, block, size);
if (bh == NULL) {
bh = __find_get_block_slow(bdev, block);
if (bh)
bh_lru_install(bh);
}
if (bh)
touch_buffer(bh);
return bh;
} | robutest/uclinux | C++ | GPL-2.0 | 60 |
/* stolen from NFS - maybe should be made a generic function? */ | static int valid_ipaddr4(const char *buf) | /* stolen from NFS - maybe should be made a generic function? */
static int valid_ipaddr4(const char *buf) | {
int rc, count, in[4];
rc = sscanf(buf, "%d.%d.%d.%d", &in[0], &in[1], &in[2], &in[3]);
if (rc != 4)
return -EINVAL;
for (count = 0; count < 4; count++) {
if (in[count] > 255)
return -EINVAL;
}
return 0;
} | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* Received RR (Receive Ready) frame from peer station, no harm in making it inline since its called only from one single place (irlap_driver_rcv). */ | static void irlap_recv_rr_frame(struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info, int command) | /* Received RR (Receive Ready) frame from peer station, no harm in making it inline since its called only from one single place (irlap_driver_rcv). */
static void irlap_recv_rr_frame(struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info, int command) | {
info->nr = skb->data[1] >> 5;
if (command)
irlap_do_event(self, RECV_RR_CMD, skb, info);
else
irlap_do_event(self, RECV_RR_RSP, skb, info);
} | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* Returns the number of bytes handles or -errno in case of an error. Short reads are only returned if the end of the file is reached. */ | static ssize_t handle_aiocb_rw_linear(RawPosixAIOData *aiocb, char *buf) | /* Returns the number of bytes handles or -errno in case of an error. Short reads are only returned if the end of the file is reached. */
static ssize_t handle_aiocb_rw_linear(RawPosixAIOData *aiocb, char *buf) | {
ssize_t offset = 0;
ssize_t len;
while (offset < aiocb->aio_nbytes) {
if (aiocb->aio_type & QEMU_AIO_WRITE) {
len = pwrite(aiocb->aio_fildes,
(const char *)buf + offset,
aiocb->aio_nbytes - offset,
aiocb->aio_of... | ve3wwg/teensy3_qemu | C++ | Other | 15 |
/* This file is part of the Simba project. */ | int mock_write_base64_encode(char *dst_p, const void *src_p, size_t size, int res) | /* This file is part of the Simba project. */
int mock_write_base64_encode(char *dst_p, const void *src_p, size_t size, int res) | {
harness_mock_write("base64_encode(): return (dst_p)",
dst_p,
strlen(dst_p) + 1);
harness_mock_write("base64_encode(src_p)",
src_p,
size);
harness_mock_write("base64_encode(size)",
&size,
... | eerimoq/simba | C++ | Other | 337 |
/* This file is part of the TinyUSB stack. */ | void button_init(void) | /* This file is part of the TinyUSB stack. */
void button_init(void) | {
ANSELBCLR = TU_BIT(12);
TRISBSET = TU_BIT(12);
} | prusa3d/Prusa-Firmware-Buddy | C++ | Other | 1,019 |
/* Check the string length check no more than given number of characters.
Function iterates through the string searching for the zero character. Even when it is not found it stops iterating after maximum of */ | static size_t safe_strlen(char const *str, size_t nmax) | /* Check the string length check no more than given number of characters.
Function iterates through the string searching for the zero character. Even when it is not found it stops iterating after maximum of */
static size_t safe_strlen(char const *str, size_t nmax) | {
size_t n=0;
while ('\0' != *str++)
{
++n;
if (0 == --nmax)
break;
}
return n;
} | remotemcu/remcu-chip-sdks | C++ | null | 436 |
/* Try to grow the stack by at least 'n' elements. when 'raiseerror' is true, raises any error; otherwise, return 0 in case of errors. */ | int luaD_growstack(lua_State *L, int n, int raiseerror) | /* Try to grow the stack by at least 'n' elements. when 'raiseerror' is true, raises any error; otherwise, return 0 in case of errors. */
int luaD_growstack(lua_State *L, int n, int raiseerror) | {
lua_assert(stacksize(L) == ERRORSTACKSIZE);
if (raiseerror)
luaD_throw(L, LUA_ERRERR);
return 0;
}
else {
int newsize = 2 * size;
int needed = cast_int(L->top - L->stack) + n;
if (newsize > LUAI_MAXSTACK)
newsize = LUAI_MAXSTACK;
if (newsize < needed)
newsize = needed... | Nicholas3388/LuaNode | C++ | Other | 1,055 |
/* Set door bell and wait it to be ACKed by host controller. This function is used to synchronize with the hardware. */ | EFI_STATUS EhcSetAndWaitDoorBell(IN USB2_HC_DEV *Ehc, IN UINT32 Timeout) | /* Set door bell and wait it to be ACKed by host controller. This function is used to synchronize with the hardware. */
EFI_STATUS EhcSetAndWaitDoorBell(IN USB2_HC_DEV *Ehc, IN UINT32 Timeout) | {
EFI_STATUS Status;
UINT32 Data;
EhcSetOpRegBit (Ehc, EHC_USBCMD_OFFSET, USBCMD_IAAD);
Status = EhcWaitOpRegBit (Ehc, EHC_USBSTS_OFFSET, USBSTS_IAA, TRUE, Timeout);
Data = EhcReadOpReg (Ehc, EHC_USBSTS_OFFSET);
Data &= ~USBSTS_INTACK_MASK;
Data |= USBSTS_IAA;
EhcWriteOpReg (Ehc, EHC_USBSTS_OFFSE... | tianocore/edk2 | C++ | Other | 4,240 |
/* USART disable data inversion.
Logical data from the data register are send/received in positive/direct logic. (1=H, 0=L) */ | void usart_disable_data_inversion(uint32_t usart) | /* USART disable data inversion.
Logical data from the data register are send/received in positive/direct logic. (1=H, 0=L) */
void usart_disable_data_inversion(uint32_t usart) | {
USART_CR2(usart) &= ~USART_CR2_DATAINV;
} | insane-adding-machines/unicore-mx | C++ | GNU General Public License v3.0 | 50 |
/* Clear a bit in a control register of all cpus */ | void smp_ctl_clear_bit(int cr, int bit) | /* Clear a bit in a control register of all cpus */
void smp_ctl_clear_bit(int cr, int bit) | {
struct ec_creg_mask_parms parms;
memset(&parms.orvals, 0, sizeof(parms.orvals));
memset(&parms.andvals, 0xff, sizeof(parms.andvals));
parms.andvals[cr] = ~(1L << bit);
on_each_cpu(smp_ctl_bit_callback, &parms, 1);
} | EmcraftSystems/linux-emcraft | C++ | Other | 266 |
/* Erases the flash memory. Note that this function also checks that no data is erased outside the flash memory region, so the bootloader can never be erased. */ | blt_bool FlashErase(blt_addr addr, blt_int32u len) | /* Erases the flash memory. Note that this function also checks that no data is erased outside the flash memory region, so the bootloader can never be erased. */
blt_bool FlashErase(blt_addr addr, blt_int32u len) | {
blt_int8u first_sector;
blt_int8u last_sector;
if ((len - 1) > (FLASH_END_ADDRESS - addr))
{
return BLT_FALSE;
}
first_sector = FlashGetSector(addr);
last_sector = FlashGetSector(addr+len-1);
if ((first_sector == FLASH_INVALID_SECTOR) || (last_sector == FLASH_INVALID_SECTOR))
{
return BLT_F... | feaser/openblt | C++ | GNU General Public License v3.0 | 601 |
/* Register a callback to receive when inv_start_mpl() is called. */ | inv_error_t inv_register_mpl_start_notification(inv_error_t(*start_cb)(void)) | /* Register a callback to receive when inv_start_mpl() is called. */
inv_error_t inv_register_mpl_start_notification(inv_error_t(*start_cb)(void)) | {
if (inv_start_cb.num_cb >= INV_MAX_START_CB)
return INV_ERROR_INVALID_PARAMETER;
inv_start_cb.start_cb[inv_start_cb.num_cb] = start_cb;
inv_start_cb.num_cb++;
return INV_SUCCESS;
} | Luos-io/luos_engine | C++ | MIT License | 496 |
/* Enables or disables the USART's Smart Card mode. */ | void USART_SmartCardCmd(USART_TypeDef *USARTx, FunctionalState NewState) | /* Enables or disables the USART's Smart Card mode. */
void USART_SmartCardCmd(USART_TypeDef *USARTx, FunctionalState NewState) | {
assert_param(IS_USART_ALL_PERIPH(USARTx));
assert_param(IS_FUNCTIONAL_STATE(NewState));
if (NewState != DISABLE)
{
USARTx->CR3 |= USART_CR3_SCEN;
}
else
{
USARTx->CR3 &= (uint32_t)~((uint32_t)USART_CR3_SCEN);
}
} | avem-labs/Avem | C++ | MIT License | 1,752 |
/* Dissect RFC 1006 TPKT, which wraps a TPKT header around an OSI TP PDU. */ | static int dissect_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) | /* Dissect RFC 1006 TPKT, which wraps a TPKT header around an OSI TP PDU. */
static int dissect_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) | {
dissect_tpkt_encap(tvb, pinfo, tree, tpkt_desegment, osi_tp_handle);
return tvb_captured_length(tvb);
} | seemoo-lab/nexmon | C++ | GNU General Public License v3.0 | 2,330 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.