Search Results

Search found 4 results on 1 pages for 'geschema'.

Page 1/1 | 1 

  • Small business: what should I know about computer security?

    - by geschema
    I run a small (1 man) consulting company in the field of embedded systems, working from home using a standard DSL internet access. My main development machine is a Windows XP PC, which is connected to the router with an ethernet cable. I also have a MacBook Pro laptop, which is connects to the network via WLAN (WPA-PSK). Besides enabling the Windows firewall, not using IE, having an up-to-date antivirus program and strong passwords, what do I need to know to keep my customers' data safe on these computers?

    Read the article

  • C-macro: set a register field defined by a bit-mask to a given value

    - by geschema
    I've got 32-bit registers with field defined as bit-masks, e.g. #define BM_TEST_FIELD 0x000F0000 I need a macro that allows me to set a field (defined by its bit-mask) of a register (defined by its address) to a given value. Here's what I came up with: #include <stdio.h> #include <assert.h> typedef unsigned int u32; /* * Set a given field defined by a bit-mask MASK of a 32-bit register at address * ADDR to a value VALUE. */ #define SET_REGISTER_FIELD(ADDR, MASK, VALUE) \ { \ u32 mask=(MASK); u32 value=(VALUE); \ u32 mem_reg = *(volatile u32*)(ADDR); /* Get current register value */ \ assert((MASK) != 0); /* Null masks are not supported */ \ while(0 == (mask & 0x01)) /* Shift the value to the left until */ \ { /* it aligns with the bit field */ \ mask = mask >> 1; value = value << 1; \ } \ mem_reg &= ~(MASK); /* Clear previous register field value */ \ mem_reg |= value; /* Update register field with new value */ \ *(volatile u32*)(ADDR) = mem_reg; /* Update actual register */ \ } /* Test case */ #define BM_TEST_FIELD 0x000F0000 int main() { u32 reg = 0x12345678; printf("Register before: 0x%.8X\n", reg);/* should be 0x12345678 */ SET_REGISTER_FIELD(&reg, BM_TEST_FIELD, 0xA); printf("Register after: 0x%.8X\n", reg); /* should be 0x123A5678 */ return 0; } Is there a simpler way to do it?

    Read the article

  • On-the-fly lossless image compression

    - by geschema
    I have an embedded application where an image scanner sends out a stream of 16-bit pixels that are later assembled to a grayscale image. As I need to both save this data locally and forward it to a network interface, I'd like to compress the data stream to reduce the required storage space and network bandwidth. Is there a simple algorithm that I can use to losslessly compress the pixel data? I first thought of computing the difference between two consecutive pixels and then encoding this difference with a Huffman code. Unfortunately, the pixels are unsigned 16-bit quantities so the difference can be anywhere in the range -65535 .. +65535 which leads to potentially huge codeword lengths. If a few really long codewords occur in a row, I'll run into buffer overflow problems.

    Read the article

  • How to read raw bytes from an SD card?

    - by geschema
    On a Windows PC, is there a way to read the raw bytes from an SD card attached trough a USB card reader? The SD card gets written from an embedded system using no file system at all, so I can't use standard file access routines. This is similar to what the unix dd utility does, but I need to integrate this into a .NET application.

    Read the article

1