Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
coreylakey
committed
Jul 20, 2016
1 parent
43809f6
commit 0274d74
Showing
163 changed files
with
150,315 additions
and
2,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#include "matrixrgb_hw.h" | ||
#include "resources.h" | ||
|
||
sbit MATRIXRGB_CS at GPIOD_ODR.B13; | ||
sbit MATRIXRGB_READY at GPIOD_IDR.B10; | ||
sbit MATRIXRGB_RST at GPIOC_ODR.B2; | ||
|
||
void system_setup( uint8_t width, uint8_t height, panel_size_t panel_size ); | ||
|
||
void main() | ||
{ | ||
color_t my_color; | ||
panel_size_t panel_size; | ||
|
||
panel_size = SMALL_PANEL; | ||
|
||
system_setup( 1, 2, panel_size ); | ||
|
||
matrixrgb_set_color( &my_color, 1, 0, 0 ); | ||
matrixrgb_scroll_img_left( MikroE_Sign_bmp, 32, 32, 35 ); | ||
matrixrgb_scroll_off_scrn_down( 35 ); | ||
matrixrgb_set_color( &my_color, 1, 1, 1 ); | ||
matrixrgb_scroll_text_right( "Matrix ", my_color, 10, 10 ); | ||
matrixrgb_set_color( &my_color, 1, 0, 0 ); | ||
matrixrgb_scroll_text_left( "R", my_color, 10, 1 ); | ||
matrixrgb_set_color( &my_color, 0, 1, 0 ); | ||
matrixrgb_scroll_text_left( "G", my_color, 10, 1 ); | ||
matrixrgb_set_color( &my_color, 0, 0, 1 ); | ||
matrixrgb_scroll_text_left( "B ", my_color, 10, 1 ); | ||
matrixrgb_set_color( &my_color, 1, 1, 1 ); | ||
matrixrgb_scroll_off_scrn_up( 10 ); | ||
|
||
while(1) | ||
{ | ||
matrixrgb_set_color( &my_color, 1, 1, 1 ); | ||
matrixrgb_scroll_text_left( "Matrix", my_color, 20, 10 ); | ||
matrixrgb_set_color( &my_color, 1, 0, 0 ); | ||
matrixrgb_scroll_text_left( "R", my_color, 20, 1 ); | ||
matrixrgb_set_color( &my_color, 0, 1, 0 ); | ||
matrixrgb_scroll_text_left( "G", my_color, 20, 1 ); | ||
matrixrgb_set_color( &my_color, 0, 0, 1 ); | ||
matrixrgb_scroll_text_left( "B", my_color, 20, 1 ); | ||
// matrixrgb_refresh(); | ||
} | ||
} | ||
|
||
void system_setup( uint8_t width, uint8_t height, panel_size_t panel_size ) | ||
{ | ||
GPIO_Digital_Output( &GPIOD_BASE, _GPIO_PINMASK_13); // Set Chip Select pin as output | ||
GPIO_Digital_Output( &GPIOC_BASE, _GPIO_PINMASK_2 ); // Set Reset pin to output | ||
GPIO_Digital_Input( &GPIOD_BASE, _GPIO_PINMASK_10); // Set Ready to input | ||
|
||
// Initialize SPI | ||
SPI3_Init_Advanced(_SPI_FPCLK_DIV2, _SPI_MASTER | _SPI_8_BIT | | ||
_SPI_CLK_IDLE_LOW | _SPI_FIRST_CLK_EDGE_TRANSITION | | ||
_SPI_MSB_FIRST | _SPI_SS_DISABLE | _SPI_SSM_DISABLE | _SPI_SSI_1, | ||
&_GPIO_MODULE_SPI3_PC10_11_12); | ||
|
||
MATRIXRGB_RST = 0; //Reset slave ( toggle ) | ||
Delay_ms(20); | ||
MATRIXRGB_RST = 1; | ||
Delay_ms(200); | ||
|
||
matrixrgb_init( width, height, panel_size ); | ||
Delay_ms(200); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
[DEVICE] | ||
Name=STM32F107VC | ||
Clock=72000000 | ||
[MEMORY_MODEL] | ||
Value=0 | ||
[BUILD_TYPE] | ||
Value=0 | ||
[ACTIVE_TAB] | ||
Value=MatrixRGB_Firmware_Merge.c | ||
[USE_EEPROM] | ||
Value=0 | ||
[USE_HEAP] | ||
Value=0 | ||
[HEAP_SIZE] | ||
Value=2000 | ||
[EEPROM_DEFINITION] | ||
Value= | ||
[FILES] | ||
Count=4 | ||
File0=MatrixRGB_Firmware_Merge.c | ||
File1=\\VBOXSVR\corey\Projects\ClickLibraries\MatrixRGB_Click\library\Application\Application_Library\resources\resources.c | ||
[BINARIES] | ||
Count=0 | ||
[IMAGES] | ||
Count=0 | ||
ActiveImageIndex=-1 | ||
[OPENED_FILES] | ||
Count=7 | ||
File0=MatrixRGB_Firmware_Merge.c | ||
File1=\\VBOXSVR\corey\Projects\ClickLibraries\MatrixRGB_Click\library\Application\Application_Library\resources\resources.c | ||
File2=\\VBOXSVR\corey\Projects\ClickLibraries\MatrixRGB_Click\library\Application\Application_Library\resources\resources.h | ||
File5=..\libraries\Application_Library\src\matrixrgb_hal.c | ||
File6=..\libraries\Application_Library\include\matrixrgb_hal.h | ||
[EEPROM] | ||
Count=0 | ||
[ACTIVE_COMMENTS_FILES] | ||
Count=0 | ||
[OTHER_FILES] | ||
Count=0 | ||
[SEARCH_PATH] | ||
Count=9 | ||
Path0=C:\Users\Public\Documents\Mikroelektronika\mikroC PRO for ARM\Defs\ | ||
Path1=C:\Users\Public\Documents\Mikroelektronika\mikroC PRO for ARM\Uses\ | ||
Path2=C:\Users\Corey\Documents\Projects\MatrixRGB\Firmware_Merge_Attempt\ARM_Done\ | ||
Path3=C:\Users\Public\Documents\Mikroelektronika\mikroC PRO for ARM\Uses\ST M3\ | ||
Path4=C:\Users\Corey\Documents\Projects\MatrixRGB\Firmware_Merge_Attempt\ | ||
Path5=\\VBOXSVR\corey\Projects\ClickLibraries\MatrixRGB_Click\library\Application\Application_Library\resources\ | ||
Path6=C:\Users\Corey\Documents\Projects\MatrixRGB\Firmware_Merge_Attempt\libraries\Application_Library\src\ | ||
[HEADER_PATH] | ||
Count=5 | ||
Path0=\\VBOXSVR\corey\Projects\ClickLibraries\MatrixRGB_Click\library\Application\Application_Library\resources\ | ||
Path1=C:\Users\Corey\Documents\Projects\MatrixRGB\Firmware_Merge_Attempt\libraries\Application_Library\include\ | ||
[HEADERS] | ||
Count=3 | ||
File0=\\VBOXSVR\corey\Projects\ClickLibraries\MatrixRGB_Click\library\Application\Application_Library\resources\resources.h | ||
[PLDS] | ||
Count=0 | ||
[Useses] | ||
Count=3 | ||
File0=Conversions | ||
File1=C_String | ||
File2=SPI | ||
[EXPANDED_NODES] | ||
Node0=Sources | ||
Node1=Header Files | ||
Count=2 | ||
[PROGRAMMER_OPTIONS] | ||
Value=SWD | ||
[PROGRAMMER_TYPE] | ||
Value=mE | ||
[DEBUGGER_TYPE] | ||
Value=default | ||
[AT_DEBUG_STARTUP] | ||
LOAD_BIN_TO_RAM=0 | ||
START_EXEC_FROM_ADDR=0 | ||
START_ADDR=-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.