Motorola DSP56800 Guía de usuario Pagina 184

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 446
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 183
Inline Assembly Language and Intrinsics
Intrinsic Functions
184
Targeting MC56F83xx/DSP5685x Controllers
#pragma section DATA_INT_MODULO begin
int int_buf[10];
#pragma section DATA_INT_MODULO end
/* Convenient defines for modulo descriptors */
#define M0 0
#define M1 1
int main ( void )
{
int i;
/* Modulo buffer will be initialized. R0 will be the modulo pointer
register. The buffer size is 10 units. The unit size is ‘sizeof(int)’.
*/
__mod_init(M0, (void *)&int_buf[0], 10, sizeof(int));
/* Write the modulo control register */
__mod_start();
/* Write int_buf[0] through int_buf[9]. R0 initially points at
int_buf[0] and wraps when the pointer value exceeds int_buf[9]. The
pointer is updated by 1 unit each time through the loop */
for ( i=0; i<100; i++ )
{
*((int *)__mod_access(M0))
= i;
__mod_update(M0, 1);
}
/* Reset modulo control register to linear addressing mode */
__mod_stop();
}
Vista de pagina 183
1 2 ... 179 180 181 182 183 184 185 186 187 188 189 ... 445 446

Comentarios a estos manuales

Sin comentarios