Matt Spinler | fb35a32 | 2018-11-26 14:30:30 -0600 | [diff] [blame] | 1 | #include "button_handler.hpp" |
| 2 | |
Matt Spinler | 9479b06 | 2023-04-04 11:02:39 -0500 | [diff] [blame] | 3 | #include <sdeventplus/event.hpp> |
| 4 | |
George Liu | 94afa4b | 2022-06-20 13:36:43 +0800 | [diff] [blame] | 5 | int main(void) |
Matt Spinler | fb35a32 | 2018-11-26 14:30:30 -0600 | [diff] [blame] | 6 | { |
| 7 | auto bus = sdbusplus::bus::new_default(); |
Matt Spinler | 9479b06 | 2023-04-04 11:02:39 -0500 | [diff] [blame] | 8 | auto event = sdeventplus::Event::get_default(); |
| 9 | |
| 10 | bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL); |
Matt Spinler | fb35a32 | 2018-11-26 14:30:30 -0600 | [diff] [blame] | 11 | |
| 12 | phosphor::button::Handler handler{bus}; |
| 13 | |
Matt Spinler | 9479b06 | 2023-04-04 11:02:39 -0500 | [diff] [blame] | 14 | return event.loop(); |
Matt Spinler | fb35a32 | 2018-11-26 14:30:30 -0600 | [diff] [blame] | 15 | } |