Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdint.h>
- #include "pru_cfg.h"
- #include "resource_table_empty.h"
- volatile register uint32_t __R30;
- volatile register uint32_t __R31;
- /* Mapping Constant table register to variable */
- volatile pruCfg CT_CFG __attribute__((cregister("PRU_CFG", near), peripheral));
- void main() {
- uint32_t gpio;
- /* Clear SYSCFG[STANDBY_INIT] to enable OCP master port */
- CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
- /* GPI Mode 0, GPO Mode 0 */
- CT_CFG.GPCFG0 = 0;
- gpio = 0x000FFFF;
- __R30 = 0x0;
- /* TODO: Create stop condition, else it will toggle indefinitely */
- while(1)
- {
- __R30 ^= gpio;
- __delay_cycles(10000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement