<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="Tiki CMS/Groupware via FeedCreator 1.7.2.1" -->
<?xml-stylesheet href="http://www.casainho.net/lib/rss/rss-style.css" type="text/css"?>
<?xml-stylesheet href="http://www.casainho.net/lib/rss/rss20.xsl" type="text/xsl"?>
<rss version="2.0">
    <channel>
        <title>Tiki RSS feed for weblogs</title>
        <description></description>
        <link>http://www.casainho.net/tiki-blogs_rss.php?ver=2</link>
        <lastBuildDate>Tue, 07 Sep 2010 22:48:43 +0100</lastBuildDate>
        <generator>Tiki CMS/Groupware via FeedCreator 1.7.2.1</generator>
        <image>
            <url>http://www.casainho.net/img/tiki.jpg</url>
            <title></title>
            <link>http://www.casainho.net/tiki-index.php</link>
            <description><![CDATA[Feed provided by . Click to visit.]]></description>
        </image>
        <language>en-us</language>
        <item>
            <title>Encode videos in MP4(H264) por Flash Player</title>
            <link>http://www.casainho.net/tiki-view_blog_post.php?blogId=1&amp;postId=15</link>
            <description><![CDATA[Recently, Adobe announced a <a class="wiki external" target="_blank" href="http://labs.adobe.com/downloads/flashplayer9.html">new version (21.08.2007) of Flash Player that plays H264, MP4 videos</a><img border="0" class="externallink" src="img/icons/external_link.gif" alt="external link" /> <img alt="biggrin" src="img/smiles/icon_biggrin.gif" /><br />
<br />
I made a script to encode my videos for MP4 that is played in Flash Player. It uses mencoder and MP4BOX. Here is the script:<br />
<pre class="codelisting" dir="ltr" style="overflow:auto;">#create an empty file for passlogfile
touch /tmp/h264..log

#1 and 2nd passes
nice -n 0 mencoder  -nosound -ovc x264 -x264encopts pass=1:bitrate=2000:ref=3:mixed-refs=1:bframes=3:b-pyramid=1:b-rdo=1:bime=1:weightb=1:subme=6:trellis=1:analyse=all:8x8dct=1 -passlogfile /tmp/h264..log -o /dev/null

nice -n 0 mencoder  -oac faac -faacopts br=64:object=2 -ovc x264 -x264encopts pass=2:bitrate=2000:ref=3:mixed-refs=1:bframes=3:b-pyramid=1:b-rdo=1:bime=1:weightb=1:subme=6:trellis=1:analyse=all:8x8dct=1 -passlogfile /tmp/h264..log -o .avi

#put in MP4
MP4Box -aviraw video .avi
MP4Box -aviraw audio .avi
mv _audio.raw _audio.aac
rm 
MP4Box -add _video.h264 
MP4Box -add _audio.aac 
rm _audio.aac _video.h264 .avi</pre><br />
Use: <i>./mov2MP4.sh video.mov video.mp4</i><br />
<br />
I use this script on <i>my Linux Ubuntu</i>. It encodes my videos to H264 video High Profile at 2000bs and audio in AAC at 64bs.<br />
<br />
Also JW Flash players were updated for this new version o Flash Player. Here is the result, one video in MP4:<br />
<br />
<embed src="http://html.casainho.net/programas/jeroflashmediaplayer/mediaplayer.swf" width="720" height="560" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=http://blip.tv/file/get/Jpcasainho-Jam_desporto_ruaAlbergaria11082007920.mp4&amp;displayheight=540&amp;transition=random&amp;shownavigation=true&amp;backcolor=0xffffff&amp;frontcolor=0x0&amp;lightcolor=0xff0000&amp;autoscroll=true&amp;logo=false&amp;overstretch=fit&amp;showdigits=false&amp;showeq=false&amp;showicons=true&amp;thumbsinplaylist=true&amp;autostart=false&amp;bufferlength=5&amp;repeat=list&amp;rotatetime=8&amp;shuffle=true&amp;volume=80&amp;showeq=false&amp;showicons=true&amp;autostart=false&amp;bufferlength=5&amp;repeat=list&amp;rotatetime=8&amp;shuffle=true&amp;volume80&amp;usecaptions=false&amp;linkfromdisplay=true&amp;linktarget=_blank&amp;usefullscreen=true&amp;usekeys=true&amp;image=http://static.blip.tv/Jpcasainho-Jam_desporto_ruaAlbergaria11082007715.jpg"/><br />
<br />
Download: <a class="wiki external" target="_blank" href="http://blip.tv/file/get/Jpcasainho-Jam_desporto_ruaAlbergaria11082007920.mp4">http://blip.tv/file/get/Jpcasainho-Jam_desporto_ruaAlbergaria11082007920.mp4</a><img border="0" class="externallink" src="img/icons/external_link.gif" alt="external link" />.<br />
]]></description>
            <author>casainho</author>
            <pubDate>Sat, 25 Aug 2007 15:45:29 +0100</pubDate>
        </item>
        <item>
            <title>Compilar o obejcto PLAYLIST para o PureData</title>
            <link>http://www.casainho.net/tiki-view_blog_post.php?blogId=1&amp;postId=14</link>
            <description><![CDATA[Hoje tentei compilar o objecto <a class="wiki external" target="_blank" href="http://ydegoyon.free.fr/software.html">playlist</a><img border="0" class="externallink" src="img/icons/external_link.gif" alt="external link" /> para o Puredata.<br />
<br />
<b>1º problema:</b><br />
<pre class="codelisting" dir="ltr" style="overflow:auto;">root@cas-desktop:/usr/local/lib/pd/extra/playlist# make
./tk2c.bash < playlist.tk > playlist.tk2c
gcc -DPD -DUNIX -O2 -funroll-loops -fomit-frame-pointer -Wall -W -Wno-shadow -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-switch -Werror -g -I../../src -o playlist.o -c playlist.c
playlist.c:41:19: error: m_imp.h: Ficheiro ou directoria inexistente
playlist.c:42:22: error: g_canvas.h: Ficheiro ou directoria inexistente
playlist.c:43:18: error: t_tk.h: Ficheiro ou directoria inexistente</pre><br />
Pelo que dá para ver, o programa não encontrava esses ficheiros.<br />
<br />
<b>Solução:</b><br />
Editar o <i>makefile</i> do playlist e substituir <i>LINUXINCLUDE =  -I/media/data/06_software/puredata/pure-data/pd/src</i> por <i>LINUXINCLUDE =  -I/media/data/06_software/puredata/pure-data/pd/src</i>. O truque foi dizer qual o directório source do Puredata.<br />
<br />
<b>2º problema:</b><br />
<pre class="codelisting" dir="ltr" style="overflow:auto;">root@cas-desktop:/usr/local/lib/pd/extra/playlist# make
./tk2c.bash < playlist.tk > playlist.tk2c
gcc -DPD -DUNIX -O2 -funroll-loops -fomit-frame-pointer -Wall -W -Wno-shadow -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-switch -Werror -g -I/media/data/06_software/puredata/pure-data/pd/src -o playlist.o -c playlist.c
ld -export_dynamic  -shared -o playlist.pd_linux playlist.o -lc -lm
ld: playlist.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC</pre><br />
Tenho obtido esse erro agora que estou num sistema de 64bits.<br />
<br />
<b>Solução:</b><br />
Editar o <i>makefile</i> do playlist e à frente das opções do <i>LINUXCFLAGS</i> adicionar <i>-fPIC</i>.<br />
<br />
E pronto, seguidamente o <i>make</i> funcionou e depois o <i>make install</i> também, o objecto ficou a funcionar perfeitamente <img alt="wink" src="img/smiles/icon_wink.gif" /><br />
]]></description>
            <author>casainho</author>
            <pubDate>Sun, 12 Aug 2007 22:03:31 +0100</pubDate>
        </item>
        <item>
            <title>Dicionário em pt_PT - Aspell e Ispell </title>
            <link>http://www.casainho.net/tiki-view_blog_post.php?blogId=1&amp;postId=13</link>
            <description><![CDATA[O International Aspell é um software open source para correcção ortográfica, antecede todos os outros correctores ortográficos mais populares. O Ispell é usados por diversos programas (emacs/vi) e sistemas operativos.<br />
<br />
<b><a class="wiki external" target="_blank" href="http://natura.di.uminho.pt/wiki/index.cgi?Dicion%C3%A1rios">Dicionário em pt_PT - Aspell e Ispell</a><img border="0" class="externallink" src="img/icons/external_link.gif" alt="external link" /></b> alojado na Universidade do Minho <img alt="biggrin" src="img/smiles/icon_biggrin.gif" />.<br />
]]></description>
            <author>casainho</author>
            <pubDate>Fri, 10 Aug 2007 08:33:08 +0100</pubDate>
        </item>
        <item>
            <title>Entrevista para o Ponto Verde, programa da rádio RUC - Rádio Universidade de C</title>
            <link>http://www.casainho.net/tiki-view_blog_post.php?blogId=1&amp;postId=12</link>
            <description><![CDATA[Fui entrevistado para o programa <i>Ponto Verde</i>, da rádio RUC - Rádio Universidade de Coimbra. Os assuntos abordados foram: <a class="wiki external" target="_blank" href="http://www.parkouraveiro.net/">Desporto na rua</a><img border="0" class="externallink" src="img/icons/external_link.gif" alt="external link" />; <a class="wiki external" target="_blank" href="http://massacriticacentro.casainho.net/">Massa Crítica</a><img border="0" class="externallink" src="img/icons/external_link.gif" alt="external link" /> e Free Software.<br />
<br />
<embed src="http://html.casainho.net/programas/jeroflashmediaplayer/mediaplayer.swf" width="720" height="20" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=http://blip.tv/file/get/Jpcasainho-JPCasainhoRUC41_Ponto_Verde28072007_11h847.mp3&amp;displayheight=0&amp;transition=random&amp;shownavigation=true&amp;backcolor=0xffffff&amp;frontcolor=0x0&amp;lightcolor=0xff0000&amp;autoscroll=true&amp;logo=false&amp;overstretch=false&amp;showdigits=false&amp;showeq=false&amp;showicons=true&amp;thumbsinplaylist=true&amp;autostart=false&amp;bufferlength=5&amp;repeat=list&amp;rotatetime=8&amp;shuffle=true&amp;volume=80&amp;showeq=false&amp;showicons=true&amp;autostart=false&amp;bufferlength=5&amp;repeat=list&amp;rotatetime=8&amp;shuffle=true&amp;volume80&amp;usecaptions=false&amp;linkfromdisplay=true&amp;linktarget=_blank&amp;usefullscreen=true&amp;usekeys=true&amp;image=720"/><br />
<br />
Download: <a class="wiki external" target="_blank" href="http://blip.tv/file/get/Jpcasainho-JPCasainhoRUC41_Ponto_Verde28072007_11h847.mp3">http://blip.tv/file/get/Jpcasainho-JPCasainhoRUC41_Ponto_Verde28072007_11h847.mp3</a><img border="0" class="externallink" src="img/icons/external_link.gif" alt="external link" />.<br />
]]></description>
            <author>casainho</author>
            <pubDate>Fri, 20 Jul 2007 20:34:57 +0100</pubDate>
        </item>
        <item>
            <title>Como fazer update a bios da mother board sem ter de usar o DOS ou o M$ Windows</title>
            <link>http://www.casainho.net/tiki-view_blog_post.php?blogId=1&amp;postId=11</link>
            <description><![CDATA[<b><a class="wiki external" target="_blank" href="http://www.linuxinsight.com/how-to-flash-motherboard-bios-from-linux-no-dos-windows-no-floppy-drive.html">http://www.linuxinsight.com/how-to-flash-motherboard-bios-from-linux-no-dos-windows-no-floppy-drive.html</a><img border="0" class="externallink" src="img/icons/external_link.gif" alt="external link" /></b><br />
<br />
<br />
How to flash motherboard BIOS from Linux (no DOS/Windows, no floppy drive)?<br />
<br />
You've finally made the move to a Windows-free computer, you're enjoying your brand new Linux OS, no trojans/viruses, no slowdown, everything's perfect. Suddenly, you need to update the BIOS on your motherboard to support some new piece of hardware, but typically the motherboard vendor is offering only DOS based BIOS flash utilities. You panic! Fortunately, this problem is easy to solve...<br />
<br />
Step 1: Download FreeDOS boot disk floppy image<br />
<br />
FreeDOS, a free DOS-compatible operating system, is up to the challenge, no need for proprietary DOS versions. So, all you need is a bootable floppy disk image with FreeDOS kernel on it. We are fortunate that guys at FDOS site have prepared one suitable for us. Use the OEM Bootdisk version, the one with just kernel and command.com, because it leaves more free space on disk for the flash utility and new BIOS image. You can also find a local copy of this image attached at the end of this article. After you download the image, you need to decompress it. In other words:<br />
<br />
wget http://www.fdos.org/bootdisks/autogen/FDOEM.144.gz<br />
gunzip FDOEM.144.gz<br />
<br />
Step 2: Copy your BIOS flash utility and new BIOS image to the mounted floppy disk image<br />
<br />
Requirement for this step is that you have support for the vfat and loop file systems in the kernel. Or you can have those features compiled as modules. In the latter case, load the modules before the next step, like this.<br />
<br />
modprobe vfat<br />
modprobe loop<br />
<br />
Consult /proc/fileystems to see if you have the needed file systems supported. If you do, you should be able to "loop mount" the floppy disk image to some temporary path:<br />
<br />
mkdir /tmp/floppy<br />
mount -t vfat -o loop FDOEM.144 /tmp/floppy<br />
<br />
If the mount went without errors, copy BIOS flash utility and new BIOS image to the mounted floppy disk image. You'll probably have to unzip the archive you downloaded from your motherboard vendor site, to get to those two files. Here's just an example for my motherboard (in your case, files will have different names, of course):<br />
<br />
<ol><li> unzip 775Dual-VSTA\(2.60\).zip
</li></ol>
Archive: 775Dual-VSTA(2.60).zip<br />
<tt>  inflating: 75DVSTA2.60</tt><br />
<tt>  inflating: ASRflash.exe</tt><br />
<ol><li> cp 75DVSTA2.60 ASRflash.exe /tmp/floppy
</li></ol>
<br />
Doublecheck that everything went OK, that those two files weren't too big for the floppy:<br />
<br />
Filesystem           1K-blocks      Used Available Use% Mounted on<br />
/tmp/FDOEM.144<br />
<tt>                          1424       990       434  70% /tmp/floppy</tt><br />
<br />
Finally, unmount the floppy disk image:<br />
<br />
umount /tmp/floppy<br />
<br />
<br />
Step 3: Burn a bootable CD which will emulate floppy device for us<br />
<br />
Next step is to burn the floppy image to a CD/DVD-RW media, but in a way that it can be booted afterwards. First we need to make a bootable CD image, and then burn it. Notice that on some modern distributions, cdrecord is renamed to wodim, and mkisofs to genisoimage, but the parameters below should be the same.<br />
<br />
mkisofs -o bootcd.iso -b FDOEM.144 FDOEM.144<br />
cdrecord -v bootcd.iso<br />
<br />
Step 4: Reboot, flash, reboot, enjoy your new BIOS<br />
<br />
Finally reboot your machine, make sure that your CD drive is first in the boot sequence, and then run your BIOS upgrade procedure when the CD boots.<br />
<br />
WARNING: Flashing motherboard BIOS is a dangerous activity that can render your motherboard inoperable! While the author of this article has successfully run this procedure many times, your mileage may vary. Be careful!<br />
]]></description>
            <author>casainho</author>
            <pubDate>Sat, 16 Jun 2007 22:48:05 +0100</pubDate>
        </item>
        <item>
            <title>Embeber imagens e links no OpenOffice</title>
            <link>http://www.casainho.net/tiki-view_blog_post.php?blogId=1&amp;postId=10</link>
            <description><![CDATA[EDITAR -> LIGAÇÕES - escolher "Quebrar ligações".<br />
]]></description>
            <author>casainho</author>
            <pubDate>Fri, 25 May 2007 10:38:22 +0100</pubDate>
        </item>
        <item>
            <title>ATmega16 + GCC-AVR + FreeRTOS - código que pisca um LED utilizando duas tasks e</title>
            <link>http://www.casainho.net/tiki-view_blog_post.php?blogId=1&amp;postId=9</link>
            <description><![CDATA[<pre class="codelisting" dir="ltr" style="overflow:auto;">/*
# 
# Desliga e liga um LED na PORTC, utilizando duas tasks e dois semáforos.
#@ Casainho - 20052007
*/

#include _stdlib.h_

#ifdef GCC_MEGA_AVR
	/* EEPROM routines used only with the WinAVR compiler. */
	#include _avr/eeprom.h_

#endif


/* Scheduler include files. */
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"


//
/* Definição de variáveis globais */
//
static unsigned char PortCLatch;

xSemaphoreHandle xSemaforoLigarLED = NULL;
xSemaphoreHandle xSemaforoDesligarLED = NULL;


/*
 * The tasks functions.
 */

static void vLigarLED( void *pvParameters );
static void vDesligarLED( void *pvParameters );


/*
 * The idle hook.
 */

void vApplicationIdleHook( void );


/*
#
# Configurar o RTOS e inicialização.
#
*/

portSHORT main( void )
{
	//configurar entradas e saídas
	DDRC = DDRC | ( 1 + 2 ) ; // bits de saída prós LEDS

	// Criar os semáforos	
	vSemaphoreCreateBinary( xSemaforoLigarLED );
	vSemaphoreCreateBinary( xSemaforoDesligarLED );

	// Apanhar ambos os semáforos e dar apenas o xSemaforoLigarLED, pelo que a task vLigarLED será a primeira a ser executada.
	xSemaphoreTake( xSemaforoLigarLED, ( portTickType ) 0 );
	xSemaphoreTake( xSemaforoDesligarLED, ( portTickType ) 0 );
	xSemaphoreGive( xSemaforoLigarLED );

	/* Create the tasks. */

	xTaskCreate( vLigarLED, "LigarLED", configMINIMAL_STACK_SIZE, NULL, ((unsigned portBASE_TYPE ) tskIDLE_PRIORITY + 1), NULL );
	xTaskCreate( vDesligarLED, "DesligarLED", configMINIMAL_STACK_SIZE, NULL, ((unsigned portBASE_TYPE ) tskIDLE_PRIORITY + 1), NULL );


	/*Start the Scheduler :-) */
	vTaskStartScheduler();

	return 0;
}


/*
* Task que vai ligar o LED após conseguir o semáforo xSemaforoLigarLED.
*/

static void vLigarLED( void *pvParameters )
{


/* The parameters are not used. */
( void ) pvParameters;


portTickType xLastWakeTime;
const portTickType xFreqLEDLigado = 200; // 2 segundos

	/* Cycle for ever. */
	for( ;; )
		{

			// Apanhar o semáforo xSemaforoLigarLED
		        if( xSemaphoreTake( xSemaforoLigarLED, ( portTickType ) 0 ) == pdTRUE )
			        {

				// Ligar LED
				PortCLatch = PORTC;
				PORTC = (PortCLatch | 1 );

				// Manter o LED ligado por xFreqLEDLigado
				xLastWakeTime = xTaskGetTickCount();
				vTaskDelayUntil( &xLastWakeTime, xFreqLEDLigado );

				// Dar o semáforo xSemaforoDesligarLED
				xSemaphoreGive( xSemaforoDesligarLED );
				}
		}
}


/*
* Task que vai desligar o LED após conseguir o semáforo xSemaforoDesligarLED.
*/

static void vDesligarLED( void *pvParameters )
{

/* The parameters are not used. */
( void ) pvParameters;

portTickType xLastWakeTime;
const portTickType xFreqLEDDesligado = 100; // 1 segundo


	/* Cycle for ever. */
	for( ;; )

		{

			// Apanhar o semáforo xSemaforoDesligarLED
		        if( xSemaphoreTake( xSemaforoDesligarLED, ( portTickType ) 0 ) == pdTRUE )
			        {

				// Ligar LED
				PortCLatch = PORTC;
				PORTC = (PortCLatch & (255-1) );

				// Manter o LED desligado por xFreqLEDDesligado
				xLastWakeTime = xTaskGetTickCount();
				vTaskDelayUntil( &xLastWakeTime, xFreqLEDDesligado );

				// Dar o semáforo xSemaforoLigarLED
				xSemaphoreGive( xSemaforoLigarLED );
				}
		}
}


/*
*
*/
void vApplicationIdleHook( void )
{

}</pre><br />
<br />
]]></description>
            <author>casainho</author>
            <pubDate>Sun, 20 May 2007 20:34:04 +0100</pubDate>
        </item>
        <item>
            <title>FreeRTOS pela primeira vez - código que pisca um LED</title>
            <link>http://www.casainho.net/tiki-view_blog_post.php?blogId=1&amp;postId=8</link>
            <description><![CDATA[Hoje meti pela primeira vez o FreeRTOS a funcionar com o ATmega16 <img alt="razz" src="img/smiles/icon_razz.gif" /> <img alt="razz" src="img/smiles/icon_razz.gif" /> <img alt="razz" src="img/smiles/icon_razz.gif" /><br />
<br />
O código que apresento, faz piscar um LED, 500ms desligado e 1000ms ligado.<br />
<br />
<span id='toc'><div id='toctitle'><h3>Table of contents</h3></div><ul class="toc"><li><a href='#C_digo_com_uma_tarefa' class='link'>Código com uma tarefa</a>
</li><li><a href='#Parte_do_meu_FreeRTOSConfig_h' class='link'>Parte do meu FreeRTOSConfig.h</a>
</li></ul>
</span><br />
<h2 class="showhide_heading" id="C_digo_com_uma_tarefa">Código com uma tarefa</h2>
<pre class="codelisting" dir="ltr" style="overflow:auto;">/*
# 
# Desliga e liga um LED na PORTC<0>, utilizando uma task.
#@ Casainho - 14052007
*/

#include <_stdlib.h_>

#ifdef GCC_MEGA_AVR
	/* EEPROM routines used only with the WinAVR compiler. */
	#include <avr/eeprom.h> 
#endif

/* Scheduler include files. */
#include "FreeRTOS.h"
#include "task.h"


/* Priority definitions for the tasks. */
#define mainFlashLED_TASK_PRIORITY			( tskIDLE_PRIORITY + 1 )


/*
* The tasks functions.
*/

static void vFlashLED( void *pvParameters );


/*
* The idle hook.
*/

void vApplicationIdleHook( void );


/*****************************************/
/*
#
# Configurar o RTOS e inicialização.
#
*/

portSHORT main( void )
{
	//configurar entradas e saídas
	DDRC |= (1 << 0); // bits de saída prós LEDS

	/* Create the tasks. */
	xTaskCreate( vFlashLED, "LED", configMINIMAL_STACK_SIZE, NULL, mainFlashLED_TASK_PRIORITY, NULL );

	/*Start the Scheduler :-) */
	vTaskStartScheduler();

	return 0;
}


/*****************************************/
/*
#
# Task que vai ligar ou desligar o LED.
#
*/
static void vFlashLED( void *pvParameters )
{

/* The parameters are not used. */
( void ) pvParameters;

portTickType xLastWakeTime;
const portTickType xFreq_ligado = 1000;
const portTickType xFreq_desligado = 500;

	/* Cycle for ever. */
	for( ;; )
		{

		PORTC = 1;

		// Initialise the xLastWakeTime variable with the current time.
		xLastWakeTime = xTaskGetTickCount();
		vTaskDelayUntil( &xLastWakeTime, xFreq_ligado );


		PORTC = 0;

		// Initialise the xLastWakeTime variable with the current time.
		xLastWakeTime = xTaskGetTickCount();
		vTaskDelayUntil( &xLastWakeTime, xFreq_desligado );
		}
}


/*****************************************/
void vApplicationIdleHook( void )
{

}</pre><br />
<br />
<h2 class="showhide_heading" id="Parte_do_meu_FreeRTOSConfig_h">Parte do meu FreeRTOSConfig.h</h2>
<pre class="codelisting" dir="ltr" style="overflow:auto;">/******************************************/
 * Application specific definitions.
 *
 * These definitions should be adjusted for your particular hardware and
 * application requirements.
 *
 * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
 * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. 
 ******************************************/

#define configUSE_PREEMPTION		1
#define configUSE_IDLE_HOOK			1
#define configUSE_TICK_HOOK			0
#define configCPU_CLOCK_HZ			( ( unsigned portLONG ) 8000000 )
#define configTICK_RATE_HZ			( ( portTickType ) 1000 )
#define configMAX_PRIORITIES		( ( unsigned portBASE_TYPE ) 4 )
#define configMINIMAL_STACK_SIZE	( ( unsigned portSHORT ) 85 )
#define configTOTAL_HEAP_SIZE		( (size_t ) ( 512 ) )
#define configMAX_TASK_NAME_LEN		( 8 )
#define configUSE_TRACE_FACILITY	0
#define configUSE_16_BIT_TICKS		1
#define configIDLE_SHOULD_YIELD		0

/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 		0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )

/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */

#define INCLUDE_vTaskPrioritySet		0
#define INCLUDE_uxTaskPriorityGet		0
#define INCLUDE_vTaskDelete				0
#define INCLUDE_vTaskCleanUpResources	0
#define INCLUDE_vTaskSuspend			0
#define INCLUDE_vTaskDelayUntil			1
#define INCLUDE_vTaskDelay				0</pre><br />
]]></description>
            <author>casainho</author>
            <pubDate>Mon, 14 May 2007 17:43:02 +0100</pubDate>
        </item>
        <item>
            <title>ATmega16 + GCC-AVR + AVR-Libc</title>
            <link>http://www.casainho.net/tiki-view_blog_post.php?blogId=1&amp;postId=6</link>
            <description><![CDATA[Comecei hoje a preparar as ferramentas para construir a <a title="Homemade midi turntable" href='tiki-index.php?page=Homemade+midi+turntable' class='wiki'>Homemade midi turntable</a>.<br />
<br />
Vou usar o ATmega16, programado em C, com o GCC-AVR e a <a class="wiki external" target="_blank" href="http://www.nongnu.org/avr-libc/">AVR-Libc</a><img border="0" class="externallink" src="img/icons/external_link.gif" alt="external link" /> no Linux Ubuntu.<br />
<br />
De futuro, espero aprender a utilizar o <a class="wiki external" target="_blank" href="http://www.freertos.org/">FreeRTOS</a><img border="0" class="externallink" src="img/icons/external_link.gif" alt="external link" /> <img alt="mrgreen" src="img/smiles/icon_mrgreen.gif" /><br />
<br />
<span id='toc'><div id='toctitle'><h3>Table of contents</h3></div><ul class="toc"><li><a href='#O_meu_programa_simples_que_liga_dois_LED_s' class='link'>O meu programa simples que liga dois LED's</a>
</li><li><a href='#O_meu_makefile' class='link'>O meu makefile</a>
</li><li><a href='#O_que_tive_de_fazer_para_ter_a_porta_paralela_a_funcionar_carregar_o_m_dulo_ppdev' class='link'>O que tive de fazer para ter a porta paralela a funcionar - carregar o módulo ppdev</a>
</li></ul>
</span><br />
<h2 class="showhide_heading" id="O_meu_programa_simples_que_liga_dois_LED_s">O meu programa simples que liga dois LED's</h2>
<br />
<pre class="codelisting" dir="ltr" style="overflow:auto;">#include <_inttypes.h_>
#include <_avr/io.h_>
#include <_avr/wdt.h_>


int main (void)
	{		
	
	//desligar o WDT
	wdt_disable();

	//configurar entradas e saídas
	DDRC |= ((1 << 0) | (1 << 1) | (1 << 2)); // bits de saída prós LEDS


	while(1)
	{

	PORTC = 5;	
	}
}</pre><br />
<br />
<br />
<h2 class="showhide_heading" id="O_meu_makefile">O meu makefile</h2>
<br />
<pre class="codelisting" dir="ltr" style="overflow:auto;">MCU=atmega16
CC=avr-gcc
OBJCOPY=avr-objcopy
# optimize for size:
CFLAGS=-g -O -mmcu=$(MCU)
#-------------------
all: programa.hex
#-------------------
programa.hex : programa.out 
	$(OBJCOPY) -R .eeprom -O ihex programa.out programa.hex 
programa.out : programa.o 
	$(CC) $(CFLAGS) -o programa.out -Wl,-Map,programa.map programa.o 
programa.o : programa.c 
	$(CC) $(CFLAGS) -c programa.c
# you need to erase first before loading the program.
# load (program) the software into the eeprom:
load: programa.hex
	uisp -dpart=atmega16 -dprog=bsd -dlpt=/dev/parport0 --erase
	uisp -dpart=atmega16 -dprog=bsd -dlpt=/dev/parport0 --upload if=/media/data/05_assembly/GCC-AVR/programa.hex -v
	uisp -dpart=atmega16 -dprog=bsd -dlpt=/dev/parport0 --verify if=/media/data/05_assembly/GCC-AVR/programa.hex -v
	
#-------------------
clean:
	rm -f *.o *.map *.out
#-------------------
erase:
	uisp -dpart=atmega16 -dprog=bsd -dlpt=/dev/parport0 --erase</pre><br />
<br />
<h2 class="showhide_heading" id="O_que_tive_de_fazer_para_ter_a_porta_paralela_a_funcionar_carregar_o_m_dulo_ppdev">O que tive de fazer para ter a porta paralela a funcionar - carregar o módulo ppdev</h2>
<pre class="codelisting" dir="ltr" style="overflow:auto;">modprobe ppdev</pre><br />
]]></description>
            <author>casainho</author>
            <pubDate>Sat, 12 May 2007 15:49:07 +0100</pubDate>
        </item>
        <item>
            <title>Tikiwiki - Meus wikiplugins para Jeroflashimagerotator e Jeroflashmediaplayer.</title>
            <link>http://www.casainho.net/tiki-view_blog_post.php?blogId=1&amp;postId=5</link>
            <description><![CDATA[Após 2 semanas a desenvolver e mais duas de testes, aqui estão os plugins:<br />
<br />
<a href="http://casainho.net/tiki-download_file.php?fileId=3">parkouraveiro.net-wikiplugins_jeroflash-11052007.tar (10.24 Kb)</a><br />
<br />
Página oficial dos Flash players: <a class="wiki external" target="_blank" href="http://www.jeroenwijering.com/">http://www.jeroenwijering.com/</a><img border="0" class="externallink" src="img/icons/external_link.gif" alt="external link" />.<br />
<br />
Estes plugins que fiz para a tikiwiki, permitem que numa página wiki, seja colocada uma playlist XSPF e nessa mesma página ou em outra, seja usado um player que utilize essa playlist. O código em PHP, lê a página wiki onde está a playlist, extrai da página só a playlist e envia a playlist para o player <img alt="biggrin" src="img/smiles/icon_biggrin.gif" /> <img alt="razz" src="img/smiles/icon_razz.gif" /><br />
<br />
Exemplo: Ena Pá 2000 - Coimbra - 30032007<a href="tiki-editpage.php?page=Ena+P%C3%A1+2000+-+Coimbra+-+30032007" title="Create page: Ena+P%C3%A1+2000+-+Coimbra+-+30032007"  class="wiki wikinew">?</a><br />
]]></description>
            <author>casainho</author>
            <pubDate>Fri, 11 May 2007 09:23:37 +0100</pubDate>
        </item>
    </channel>
</rss>
