Page 205 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 205
{
USART_InitTypeDef USART_InitStructure;
USART_InitStructure.USART_BaudRate = 9600 ;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No ;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
USART_Init(USART3, &USART_InitStructure);
USART_ITConfig(USART3, USART_IT_RXNE, ENABLE);
USART_Cmd(USART3, ENABLE);
/* DIR485_L; */
/* Enable USART1 global interrupt */
NVIC_EnableIRQ(USART3_IRQn);
}
<안드로이드 앱 소스>
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.com.safe">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<!--액티비티 등록-->
<activity android:name=".connect">
- 198 -