#pragma once #define DRV_NAME "lork" #include // values from typedef uint32_t ti_am335x_word_t; // p. 180: "Control Module" #define TI_AM335X_CM_ADDR 0x44E10000 // p. 182: "GPIO1" #define TI_AM335X_GPIO1_ADDR 0x4804C000 // p. 1459: "conf_gpmc_a3" #define TI_AM335X_CM_GPMC_A3_ADDR (TI_AM335X_CM_ADDR + 0x84C) // p. 4990, variable names copied as-is #define GPIO_OE (0x134 / (sizeof(ti_am335x_word_t))) #define GPIO_DATAIN (0x138 / (sizeof(ti_am335x_word_t))) #define GPIO_CLEARDATAOUT (0x190 / (sizeof(ti_am335x_word_t))) #define GPIO_SETDATAOUT (0x194 / (sizeof(ti_am335x_word_t))) // total size of GPIO registers from p. 4990 (in bytes) #define GPIO_REG_SIZE 0x198 #define PIN 18