blob: c5238429ed20bbfc117019bd3badcd93892d9def [file] [log] [blame]
Ben Tyner9ae5ca42020-02-28 13:13:50 -06001#include <libpdbg.h>
2
Ben Tyner3fb52e52020-03-31 10:10:07 -05003#include <attn/attn_config.hpp>
Ben Tyner9ae5ca42020-02-28 13:13:50 -06004#include <attn/attn_handler.hpp>
Ben Tyner3fb52e52020-03-31 10:10:07 -05005#include <cli.hpp>
Ben Tyner9ae5ca42020-02-28 13:13:50 -06006
Ben Tyner3fb52e52020-03-31 10:10:07 -05007/** @brief Attention handler test application */
8int main(int argc, char* argv[])
Ben Tyner9ae5ca42020-02-28 13:13:50 -06009{
10 int rc = 0; // return code
11
12 // initialize pdbg targets
13 pdbg_targets_init(nullptr);
14
Ben Tyner3fb52e52020-03-31 10:10:07 -050015 // create attention handler config object
Ben Tyner72feadc2020-04-06 12:57:31 -050016 attn::Config attnConfig;
17
18 // convert cmd line args to config values
19 parseConfig(argv, argv + argc, &attnConfig);
Ben Tyner3fb52e52020-03-31 10:10:07 -050020
Ben Tyner9ae5ca42020-02-28 13:13:50 -060021 // exercise attention gpio event path
Ben Tyner72feadc2020-04-06 12:57:31 -050022 attn::attnHandler(&attnConfig);
Ben Tyner9ae5ca42020-02-28 13:13:50 -060023
24 return rc;
25}