本文整理汇总了C++中NATIVE_PROFILE_PAL_COM函数的典型用法代码示例。如果您正苦于以下问题:C++ NATIVE_PROFILE_PAL_COM函数的具体用法?C++ NATIVE_PROFILE_PAL_COM怎么用?C++ NATIVE_PROFILE_PAL_COM使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NATIVE_PROFILE_PAL_COM函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: SSL_ParseCertificate
BOOL SSL_ParseCertificate( const char* certificate, size_t certLength, const char* szPwd, X509CertData* certData )
{
if (!s_init_done) s_init_done=ssl_initialize_internal();
NATIVE_PROFILE_PAL_COM();
return ssl_parse_certificate_internal((void *)certificate,
TINYCLR_SSL_STRLEN(certificate),
NULL, (void*)certData);
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:8,代码来源:openssl.cpp
示例2: SSL_Initialize
BOOL SSL_Initialize()
{
NATIVE_PROFILE_PAL_COM();
memset(&g_SSL_Driver, 0, sizeof(g_SSL_Driver));
return TRUE;
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:8,代码来源:openssl.cpp
示例3: NATIVE_PROFILE_PAL_COM
void Sockets_NetduinoIP_Driver::ApplyConfigExtended()
{
NATIVE_PROFILE_PAL_COM();
if(!HAL_CONFIG_BLOCK::ApplyConfig( g_NetworkConfigExtended.GetDriverName(), &g_NetworkConfigExtended, sizeof(g_NetworkConfigExtended) ))
{
// save to the dynamic config section so that MFDeploy will be able to get the configuration.
SaveConfigExtended(0, NULL);
}
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:9,代码来源:sockets_netduinoip.cpp
示例4: NATIVE_PROFILE_PAL_COM
BOOL USART_Driver::Initialize( int ComPortNum, int BaudRate, int Parity, int DataBits, int StopBits, int FlowValue )
{
NATIVE_PROFILE_PAL_COM();
if((ComPortNum < 0) || (ComPortNum >= TOTAL_USART_PORT))
{
//DEBUG_TRACE1(TRACE_ALWAYS, "ERROR: VTE_USART_Initialize: invalid ComPortNum %u\r\n", ComPortNum);
return FALSE;
}
{
GLOBAL_LOCK(irq);
HAL_USART_STATE& State = Hal_Usart_State[ComPortNum];
if(!IS_USART_INITIALIZED(State))
{
State.fDataEventSet = FALSE;
State.PortIndex = ComPortNum;
// DO NOT INITIALIZE EVENT CALLBACKS HERE BECAUSE THEY CAN BE SET PRIOR TO INITIALIZE
State.Flag = 0; //clear all the flag bits
SET_USART_FLAG(State, HAL_USART_STATE::c_INITIALIZED | HAL_USART_STATE::c_TX_XON_STATE);
// If SW flow control on input is enabled
if (FlowValue & USART_FLOW_SW_IN_EN)
{
SET_USART_FLAG(State, HAL_USART_STATE::c_RX_SWFLOW_CTRL);
}
// If SW flow control on output is enabled
if (FlowValue & USART_FLOW_SW_OUT_EN)
{
SET_USART_FLAG(State, HAL_USART_STATE::c_TX_SWFLOW_CTRL);
}
// If HW flow control on input is enabled (HW output control is either totally in hardware or in HAL only)
if (FlowValue & USART_FLOW_HW_IN_EN)
{
SET_USART_FLAG(State, HAL_USART_STATE::c_RX_HWFLOW_CTRL);
}
State.RxBufferHighWaterMark = USART_BUFFER_HIGH_WATER_MARK( RX_USART_BUFFER_SIZE );
State.RxBufferLowWaterMark = USART_BUFFER_LOW_WATER_MARK ( RX_USART_BUFFER_SIZE );
State.TicksStartTxXOFF = 0;
State.TxQueue.Initialize( &TxBuffer_Com[ComPortNum * TX_USART_BUFFER_SIZE], TX_USART_BUFFER_SIZE);
State.RxQueue.Initialize( &RxBuffer_Com[ComPortNum * RX_USART_BUFFER_SIZE], RX_USART_BUFFER_SIZE );
return CPU_USART_Initialize( ComPortNum, BaudRate, Parity, DataBits, StopBits, FlowValue );
}
return TRUE;
}
}
开发者ID:TinkerPot,项目名称:.NETMF_for_LPC17xx,代码行数:57,代码来源:usart.cpp
示例5: NATIVE_PROFILE_PAL_COM
void I2C_HAL_XACTION::Initialize( I2C_USER_CONFIGURATION& config, I2C_HAL_XACTION_UNIT** xActionUnits, size_t numXActionUnits )
{
NATIVE_PROFILE_PAL_COM();
m_xActionUnits = xActionUnits;
m_numXActionUnits = numXActionUnits;
m_current = 0;
m_clockRate = I2C_Internal_GetClockRate( config.ClockRate );
m_address = config.Address;
m_status = c_Status_Idle;
}
开发者ID:prabby,项目名称:miniclr,代码行数:10,代码来源:i2c.cpp
示例6: SSL_Uninitialize
BOOL SSL_Uninitialize()
{
NATIVE_PROFILE_PAL_COM();
BOOL retVal;
retVal = ssl_uninitialize_internal();
s_init_done = FALSE;
return retVal;
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:11,代码来源:openssl.cpp
示例7: SSL_ClearCertificateAuthority
void SSL_ClearCertificateAuthority( int sslContextHandle )
{
NATIVE_PROFILE_PAL_COM();
if((sslContextHandle >= ARRAYSIZE(g_SSL_Driver.m_sslContextArray)) || (sslContextHandle < 0))
{
return;
}
memset(&g_SSL_Driver.m_sslContextArray[sslContextHandle].m_certificates[0], 0, sizeof(g_SSL_Driver.m_sslContextArray[sslContextHandle].m_certificates));
g_SSL_Driver.m_sslContextArray[sslContextHandle].m_certificateCount = 0;
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:12,代码来源:ssl.cpp
示例8: SSL_ParseCertificate
BOOL SSL_ParseCertificate( const char* certificate, size_t certLength, const char* szPwd, X509CertData* certData )
{
NATIVE_PROFILE_PAL_COM();
RTCertificate rt_cert;
int ret;
rt_cert.cert = (X509Certificate)certificate;
rt_cert.size = certLength;
ret = secure_parse_certificate( (const RTCertificate *)&rt_cert, (RTCertData*)certData );
return (-1 != ret);
}
开发者ID:dienbk7x,项目名称:NetmfSTM32,代码行数:13,代码来源:ssl.cpp
示例9: DebuggerPort_Flush
BOOL DebuggerPort_Flush( COM_HANDLE ComPortNum )
{
NATIVE_PROFILE_PAL_COM();
switch(ExtractTransport(ComPortNum))
{
case USART_TRANSPORT:
return USART_Flush( ConvertCOM_ComPort( ComPortNum ) );
case USB_TRANSPORT:
return USB_Flush( ConvertCOM_UsbStream(ComPortNum) );
case SOCKET_TRANSPORT:
return SOCKETS_Flush( ConvertCOM_SockPort(ComPortNum) );
}
return FALSE;
}
开发者ID:Sorcha,项目名称:NETMF-LPC,代码行数:15,代码来源:ComDirector.cpp
示例10: CPU_ProtectCommunicationGPIOs
void CPU_ProtectCommunicationGPIOs( BOOL On )
{
NATIVE_PROFILE_PAL_COM();
switch(ExtractTransport(HalSystemConfig.DebugTextPort))
{
case USART_TRANSPORT:
CPU_USART_ProtectPins( ConvertCOM_ComPort(HalSystemConfig.DebugTextPort), On );
return ;
case USB_TRANSPORT:
CPU_USB_ProtectPins ( ConvertCOM_UsbController(HalSystemConfig.DebugTextPort), On );
return;
default:
return;
}
}
开发者ID:Sorcha,项目名称:NETMF-LPC,代码行数:16,代码来源:ComDirector.cpp
示例11: DebuggerPort_Uninitialize
BOOL DebuggerPort_Uninitialize( COM_HANDLE ComPortNum )
{
NATIVE_PROFILE_PAL_COM();
switch(ExtractTransport(ComPortNum))
{
case USART_TRANSPORT:
return USART_Uninitialize( ConvertCOM_ComPort(ComPortNum) );
case USB_TRANSPORT:
USB_CloseStream( ConvertCOM_UsbStream(ComPortNum) );
return USB_Uninitialize( ConvertCOM_UsbController(ComPortNum) );
case SOCKET_TRANSPORT:
return SOCKETS_Uninitialize(ConvertCOM_SockPort(ComPortNum));
}
return FALSE;
}
开发者ID:Sorcha,项目名称:NETMF-LPC,代码行数:16,代码来源:ComDirector.cpp
示例12: DebuggerPort_Write
int DebuggerPort_Write( COM_HANDLE ComPortNum, const char* Data, size_t size )
{
NATIVE_PROFILE_PAL_COM();
UINT32 transport = ExtractTransport(ComPortNum);
const char* dataTmp = Data;
INT32 totWrite = 0;
int retries = 100;
while(size > 0 && retries--)
{
int ret = 0;
switch(transport)
{
case USART_TRANSPORT:
ret = USART_Write( ConvertCOM_ComPort( ComPortNum ), dataTmp, size );
break;
case USB_TRANSPORT:
ret = USB_Write( ConvertCOM_UsbStream( ComPortNum ), dataTmp, size );
break;
case SOCKET_TRANSPORT:
ret = SOCKETS_Write( ConvertCOM_SockPort(ComPortNum), dataTmp, size );
break;
}
if(ret < 0)
{
break;
}
else if(ret == 0)
{
// if interrupts are off and our buffer is full then there is nothing we can do
if(!INTERRUPTS_ENABLED_STATE()) break;
Events_WaitForEvents(0, 1);
}
else
{
retries = 50; // reset retries
size -= ret;
dataTmp += ret;
totWrite += ret;
}
}
return totWrite;
}
开发者ID:Sorcha,项目名称:NETMF-LPC,代码行数:47,代码来源:ComDirector.cpp
示例13: DebuggerPort_Initialize
BOOL DebuggerPort_Initialize( COM_HANDLE ComPortNum )
{
NATIVE_PROFILE_PAL_COM();
switch(ExtractTransport(ComPortNum))
{
case USART_TRANSPORT:
return USART_Initialize( ConvertCOM_ComPort(ComPortNum), HalSystemConfig.USART_DefaultBaudRate, USART_PARITY_NONE, 8, USART_STOP_BITS_ONE, USART_FLOW_NONE );
case USB_TRANSPORT:
if(USB_CONFIG_ERR_OK != USB_Configure( ConvertCOM_UsbController(ComPortNum), NULL )) return FALSE;
if(!USB_Initialize( ConvertCOM_UsbController(ComPortNum) )) return FALSE;
return USB_OpenStream( ConvertCOM_UsbStream(ComPortNum), USB_DEBUG_EP_WRITE, USB_DEBUG_EP_READ );
case SOCKET_TRANSPORT:
return SOCKETS_Initialize(ConvertCOM_SockPort(ComPortNum));
}
return FALSE;
}
开发者ID:Sorcha,项目名称:NETMF-LPC,代码行数:17,代码来源:ComDirector.cpp
示例14: SSL_ExitContext
BOOL SSL_ExitContext( INT32 sslContextHandle )
{
NATIVE_PROFILE_PAL_COM();
BOOL ret;
if((sslContextHandle >= ARRAYSIZE(g_SSL_Driver.m_sslContextArray)) || (sslContextHandle < 0) || (g_SSL_Driver.m_sslContextArray[sslContextHandle].SslContext == NULL))
{
return FALSE;
}
ret = (0 == secure_sslexit(g_SSL_Driver.m_sslContextArray[sslContextHandle].SslContext));
memset(&g_SSL_Driver.m_sslContextArray[sslContextHandle], 0, sizeof(g_SSL_Driver.m_sslContextArray[sslContextHandle]));
g_SSL_Driver.m_sslContextCount --;
return ret;
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:18,代码来源:ssl.cpp
示例15: SSL_Uninitialize
BOOL SSL_Uninitialize()
{
NATIVE_PROFILE_PAL_COM();
BOOL result = TRUE;
for(int i = 0; i<ARRAYSIZE(g_SSL_Driver.m_sslContextArray); i++)
{
if(g_SSL_Driver.m_sslContextArray[i].SslContext != NULL)
{
SSL_ExitContext( i );
}
}
secure_exit();
g_SSL_Driver.m_sslContextCount = 0;
return result;
}
开发者ID:dienbk7x,项目名称:NetmfSTM32,代码行数:19,代码来源:ssl.cpp
示例16: DebuggerPort_Read
int DebuggerPort_Read( COM_HANDLE ComPortNum, char* Data, size_t size )
{
NATIVE_PROFILE_PAL_COM();
int ret = 0;
switch(ExtractTransport(ComPortNum))
{
case USART_TRANSPORT:
ret = USART_Read( ConvertCOM_ComPort( ComPortNum ), Data, size );
break;
case USB_TRANSPORT:
ret = USB_Read( ConvertCOM_UsbStream( ComPortNum ), Data, size );
break;
case SOCKET_TRANSPORT:
ret = SOCKETS_Read( ConvertCOM_SockPort(ComPortNum), Data, size );
break;
}
return ret;
}
开发者ID:Sorcha,项目名称:NETMF-LPC,代码行数:20,代码来源:ComDirector.cpp
示例17: SSL_GetTime
void SSL_GetTime(DATE_TIME_INFO* pdt)
{
NATIVE_PROFILE_PAL_COM();
if(pdt == NULL) return;
if(g_SSL_Driver.m_pfnGetTimeFuncPtr != NULL)
{
g_SSL_Driver.m_pfnGetTimeFuncPtr(pdt);
}
else
{
pdt->year = 2009;
pdt->month = 1;
pdt->day = 1;
pdt->hour = 0;
pdt->minute = 0;
pdt->second = 0;
pdt->msec = 0;
pdt->dlsTime = 0;
pdt->tzOffset = -8 * 60 * 60;
}
}
开发者ID:dienbk7x,项目名称:NetmfSTM32,代码行数:23,代码来源:ssl.cpp
示例18: SSL_AddCertificateAuthority
BOOL SSL_AddCertificateAuthority( int sslContextHandle, const char* certificate, int cert_len, const char* szCertPwd )
{
NATIVE_PROFILE_PAL_COM();
SSL_Driver::SSL_Context *ctx;
RTCertificate *rtCert;
if((sslContextHandle >= ARRAYSIZE(g_SSL_Driver.m_sslContextArray)) ||
(sslContextHandle < 0) ||
(g_SSL_Driver.m_sslContextArray[sslContextHandle].m_certificateCount >= SSL_Driver::c_MaxCertificatesPerContext))
{
return FALSE;
}
ctx = &g_SSL_Driver.m_sslContextArray[sslContextHandle];
rtCert = &ctx->m_certificates[ctx->m_certificateCount];
ctx->m_certificateCount++;
rtCert->cert = (X509Certificate)certificate;
rtCert->size = cert_len;
return TRUE;
}
开发者ID:dienbk7x,项目名称:NetmfSTM32,代码行数:23,代码来源:ssl.cpp
注:本文中的NATIVE_PROFILE_PAL_COM函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论