Merge pull request #2 from TitanMKD/master
JellyBean Hardware BOM and Firmware minor update
This commit is contained in:
@ -23,15 +23,26 @@
|
||||
|
||||
void wait(uint8_t duration)
|
||||
{
|
||||
uint32_t i;
|
||||
volatile uint32_t i;
|
||||
for (i = 0; i < duration * 1000000; i++);
|
||||
}
|
||||
|
||||
uint32_t boot0, boot1, boot2, boot3;
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
gpio_init();
|
||||
|
||||
EN1V8_SET;
|
||||
EN1V8_CLR;
|
||||
|
||||
while (1) {
|
||||
boot0 = BOOT0;
|
||||
boot1 = BOOT1;
|
||||
boot2 = BOOT2;
|
||||
boot3 = BOOT3;
|
||||
|
||||
LED1_SET;
|
||||
LED2_SET;
|
||||
LED3_SET;
|
||||
@ -41,4 +52,6 @@ int main()
|
||||
LED3_CLR;
|
||||
wait(1);
|
||||
}
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
|
@ -31,6 +31,9 @@ void gpio_init()
|
||||
|
||||
/* set certain pins as outputs, all others inputs */
|
||||
GPIO_DIR2 = (PIN_LED1 | PIN_LED2 | PIN_LED3);
|
||||
|
||||
/* set certain pins as outputs, all others inputs */
|
||||
GPIO_DIR3 = (PIN_EN1V8);
|
||||
}
|
||||
|
||||
void all_pins_off(void)
|
||||
|
@ -33,9 +33,16 @@
|
||||
|
||||
/* GPIO pins */
|
||||
//#ifdef JELLYBEAN
|
||||
#define PIN_LED1 (1 << 1) /* GPIO2[1] on P4_1 */
|
||||
#define PIN_LED2 (1 << 2) /* GPIO2[2] on P4_2 */
|
||||
#define PIN_LED3 (1 << 8) /* GPIO2[8] on P6_12 */
|
||||
#define PIN_LED1 (1 << 1) /* GPIO2[1] on P4_1 */
|
||||
#define PIN_LED2 (1 << 2) /* GPIO2[2] on P4_2 */
|
||||
#define PIN_LED3 (1 << 8) /* GPIO2[8] on P6_12 */
|
||||
|
||||
#define PIN_EN1V8 (1 << 6) /* GPIO3[6] on P6_10 */
|
||||
|
||||
#define PIN_BOOT0 (1 << 8) /* GPIO0[8] on P1_1 */
|
||||
#define PIN_BOOT1 (1 << 9) /* GPIO0[9] on P1_2 */
|
||||
#define PIN_BOOT2 (1 << 7) /* GPIO5[7] on P2_8 */
|
||||
#define PIN_BOOT3 (1 << 10) /* GPIO1[10] on P2_9 */
|
||||
//#endif
|
||||
|
||||
/* indicator LED control */
|
||||
@ -49,6 +56,17 @@
|
||||
#define LED3 (GPIO_PIN2 & PIN_LED3)
|
||||
#define LED3_SET (GPIO_SET2 = PIN_LED3)
|
||||
#define LED3_CLR (GPIO_CLR2 = PIN_LED3)
|
||||
|
||||
#define EN1V8 (GPIO_PIN3 & PIN_EN1V8)
|
||||
#define EN1V8_SET (GPIO_SET3 = PIN_EN1V8)
|
||||
#define EN1V8_CLR (GPIO_CLR3 = PIN_EN1V8)
|
||||
|
||||
/* Input GPIO BOOT0 to 3 */
|
||||
#define BOOT0 (GPIO_PIN0 & PIN_BOOT0)
|
||||
#define BOOT1 (GPIO_PIN0 & PIN_BOOT1)
|
||||
#define BOOT2 (GPIO_PIN5 & PIN_BOOT2)
|
||||
#define BOOT3 (GPIO_PIN1 & PIN_BOOT3)
|
||||
|
||||
//#endif
|
||||
|
||||
void gpio_init(void);
|
||||
|
BIN
hardware/jellybean/jellybean_BOM.ods
Normal file
BIN
hardware/jellybean/jellybean_BOM.ods
Normal file
Binary file not shown.
Reference in New Issue
Block a user