freemyipod r232 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r231‎ | r232 | r233 >
Date:17:11, 30 October 2010
Author:theseven
Status:new
Tags:
Comment:
emBIOS: Move some more code to .initcode
Modified paths:
  • /embios/trunk/i2c.h (modified) (history)
  • /embios/trunk/power.h (modified) (history)
  • /embios/trunk/target/ipodnano2g/interrupt.c (modified) (history)
  • /embios/trunk/target/ipodnano2g/pmu.h (modified) (history)
  • /embios/trunk/usb/usb.h (modified) (history)
  • /embios/trunk/usb/usbdrv.h (modified) (history)

Diff [purge]

Index: embios/trunk/target/ipodnano2g/pmu.h
@@ -34,7 +34,7 @@
3535 int pmu_read_adc(unsigned int adc);
3636 int pmu_read_battery_voltage(void);
3737 int pmu_read_battery_current(void);
38 -void pmu_init(void);
 38+void pmu_init(void) INITCODE_ATTR;
3939 void pmu_ldo_on_in_standby(unsigned int ldo, int onoff);
4040 void pmu_ldo_set_voltage(unsigned int ldo, unsigned char voltage);
4141 void pmu_ldo_power_on(unsigned int ldo);
Index: embios/trunk/target/ipodnano2g/interrupt.c
@@ -23,6 +23,7 @@
2424
2525 #include "global.h"
2626 #include "panic.h"
 27+#include "interrupt.h"
2728 #include "s5l8701.h"
2829
2930
Index: embios/trunk/power.h
@@ -28,7 +28,7 @@
2929 #include "global.h"
3030
3131 void power_off(void);
32 -void power_init(void);
 32+void power_init(void) INITCODE_ATTR;
3333 bool charging_state(void);
3434 bool external_power_state(void);
3535 bool vbus_state(void);
Index: embios/trunk/i2c.h
@@ -28,7 +28,7 @@
2929 #include "global.h"
3030
3131
32 -void i2c_init();
 32+void i2c_init() INITCODE_ATTR;
3333 void i2c_send(uint32_t bus, uint32_t device, uint32_t address, const uint8_t* data, uint32_t length);
3434 void i2c_recv(uint32_t bus, uint32_t device, uint32_t address, uint8_t* data, uint32_t length);
3535 void i2c_sendbyte(uint32_t bus, uint32_t device, uint32_t address, uint32_t data);
Index: embios/trunk/usb/usb.h
@@ -32,7 +32,7 @@
3333 void usb_handle_control_request(struct usb_ctrlrequest* req);
3434 void usb_handle_transfer_complete(int endpoint, int dir, int status, int length);
3535 void usb_handle_bus_reset(void);
36 -void usb_init(void);
 36+void usb_init(void) INITCODE_ATTR;
3737
3838
3939 #endif
Index: embios/trunk/usb/usbdrv.h
@@ -38,7 +38,7 @@
3939 void usb_drv_cancel_all_transfers(void);
4040 bool usb_drv_stalled(int endpoint, bool in);
4141 void usb_drv_stall(int endpoint, bool stall, bool in);
42 -void usb_drv_init(void);
 42+void usb_drv_init(void) INITCODE_ATTR;
4343 int usb_drv_get_max_out_size();
4444 int usb_drv_get_max_in_size();
4545