Skip to content

nimaltd/atc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

at-command library


  • NONE RTOS Supported.
  • RTOS V1 Supported.
  • RTOS V2 Supported.

  • F0 tested.
  • L0 tested.
  • F1 tested.
  • L1 tested.
  • F2 tested.
  • F3 tested.
  • F4 tested.
  • L4 tested.
  • F7 tested.
  • H7 tested.

  • Enable USART (LL Library) and RX interrupt.
  • Add library to your project.
  • Configure atcConfig.h file.
  • Create a struct as global.
  • Create found callback function if you need it.
  • Call atc_init().
  • You could add always search strings now.
  • Call atc_loop() in infinit loop.
#include "atc.h"
atc_t  atc;

void  atc_found(char *foundStr)
{
  if (strstr(foundStr, "\r\n+CMD:") != NULL)
  {
  
  }
}

int main()
{
  atc_init(&atc, "MY_ATC", USART1, atc_found);
  atc_addSearch(&atc, "\r\n+CMD:");
  while (1)
  {
    atc_loop(&atc);
  }  
}