Page 376 - MDP2022-2
P. 376

void  Error_Handler(void)
            {
                /*  USER  CODE  BEGIN  Error_Handler_Debug  */
                /*  User  can  add  his  own  implementation  to  report  the  HAL  error  return  state  */
                __disable_irq();
                while  (1)
                {    }
                /*  USER  CODE  END  Error_Handler_Debug  */
            }
            #ifdef    USE_FULL_ASSERT
            /**
                *  @brief    Reports  the  name  of  the  source  file  and  the  source  line  number
                *                  where  the  assert_param  error  has  occurred.
                *  @param    file:  pointer  to  the  source  file  name
                *  @param    line:  assert_param  error  line  source  number
                *  @retval  None
                */
            void  assert_failed(uint8_t  *file,  uint32_t  line)
            {
                /*  USER  CODE  BEGIN  6  */
                /*  User  can  add  his  own  implementation  to  report  the  file  name  and  line  number,
                      ex:  printf("Wrong  parameters  value:  file  %s  on  line  %d\r\n",  file,  line)  */
                /*  USER  CODE  END  6  */
            }
            #endif  /*  USE_FULL_ASSERT  */


            안드로이드  :
            ComActivity  -
            import  android.app.Activity;
            import  android.content.Context;
            import  android.content.Intent;
            import  android.content.SharedPreferences;
            import  android.os.Build;
            import  android.os.Bundle;
            import  android.os.VibrationEffect;
            import  android.os.Vibrator;
            import  android.view.View;
            import  android.widget.Button;
            import  android.widget.Toast;
            import  androidx.appcompat.app.ActionBar;
            import  androidx.appcompat.app.AppCompatActivity;

            public  class  ComActivity  extends  AppCompatActivity  {
            private  Intent  intent;
            private  Intent  intentMain;
            private  final  String  packageNames  =  "com.example.mybluetooth";
            SharedPreferences  auto;
            SharedPreferences.Editor  editor;

            @Override
            protected  void  onCreate(Bundle  savedInstanceState)  {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_com);
            //타이틀바  없애기
            ActionBar  actionBar  =  getSupportActionBar();
   371   372   373   374   375   376   377   378   379   380   381