platform: make GPDir constants bitmaskable
device: start work on triac_dimmer
arch: add start of mock arch, for testing and such