sys_config->sys_AHB_clk_ctrl &= ~(power_bit);
}
}
+/* Check whether a subsystem is powered or not */
+uint8_t subsystem_powered(uint32_t power_bit)
+{
+ struct lpc_sys_config* sys_config = LPC_SYS_CONFIG;
+ return (sys_config->sys_AHB_clk_ctrl & power_bit);
+}
/***************************************************************************** */
/* System Clock */
/* Power on or off a subsystem */
void subsystem_power(uint32_t power_bit, uint32_t on_off);
+/* Check whether a subsystem is powered or not */
+uint8_t subsystem_powered(uint32_t power_bit);
/* Configure the brown-out detection.
* Note: Brown-Out detection must be powered to operate the ADC (See Section 19.2
/***************************************************************************** */
/* Public access to GPIO setup */
+enum gpio_ports {
+ GPIO_PORT0 = 0,
+ GPIO_PORT1,
+ GPIO_PORT2,
+};
+
#define GPIO_DIR_IN 0
#define GPIO_DIR_OUT 1